{
    "content": [
        {
            "type": "text",
            "text": "# uconv (info)\n\n## NAME\n\nuconv - convert data from one encoding to another\n\n## SYNOPSIS\n\nuconv  [  -h,  -?,  --help  ]  [ -V, --version ] [ -s, --silent ] [ -v,\n--verbose ] [ -l, --list | -l, --list-code code | --default-code |  -L,\n--list-transliterators   ]  [  --canon  ]  [  -x  transliteration  ]  [\n--to-callback callback | -c ] [  --from-callback  callback  |  -i  ]  [\n--callback callback ] [ --fallback | --no-fallback ] [ -b, --block-size\nsize ] [ -f, --from-code encoding  ]  [  -t,  --to-code  encoding  ]  [\n--add-signature  ]  [  --remove-signature  ]  [  -o,  --output file ] [\nfile...  ]\n\n## DESCRIPTION\n\nuconv converts, or transcodes, each given file (or its  standard  input\nif no file is specified) from one encoding to another.  The transcoding\nis done using Unicode as a pivot encoding  (i.e.  the  data  are  first\ntranscoded  from their original encoding to Unicode, and then from Uni-\ncode to the destination encoding).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **CALLBACKS**\n- **EXAMPLES**\n- **CAVEATS AND BUGS**\n- **AUTHORS**\n- **VERSION**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "uconv",
        "section": "",
        "mode": "info",
        "summary": "uconv - convert data from one encoding to another",
        "synopsis": "uconv  [  -h,  -?,  --help  ]  [ -V, --version ] [ -s, --silent ] [ -v,\n--verbose ] [ -l, --list | -l, --list-code code | --default-code |  -L,\n--list-transliterators   ]  [  --canon  ]  [  -x  transliteration  ]  [\n--to-callback callback | -c ] [  --from-callback  callback  |  -i  ]  [\n--callback callback ] [ --fallback | --no-fallback ] [ -b, --block-size\nsize ] [ -f, --from-code encoding  ]  [  -t,  --to-code  encoding  ]  [\n--add-signature  ]  [  --remove-signature  ]  [  -o,  --output file ] [\nfile...  ]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Print the version of uconv and exit."
            },
            {
                "flag": "-s",
                "long": "--silent",
                "arg": null,
                "description": "Suppress messages during execution."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Display extra informative messages during execution."
            },
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "List all the available encodings and exit. -l, --list-code code List only the code encoding and exit. If code is not a proper encoding, exit with an error."
            },
            {
                "flag": "",
                "long": "--default-code",
                "arg": null,
                "description": "List only the name of the default encoding and exit."
            },
            {
                "flag": "-L",
                "long": "--list-transliterators",
                "arg": null,
                "description": "List all the available transliterators and exit."
            },
            {
                "flag": "",
                "long": "--canon",
                "arg": null,
                "description": "If used with -l, --list or --default-code, the list of encodings is produced in a format compatible with convrtrs.txt(5). If used with -L, --list-transliterators, print only one transliter- ator name per line. -x transliteration Run the given transliteration on the transcoded Unicode data, and use the transliterated data as input for the transcoding to the destination encoding. --to-callback callback Use callback to handle characters that cannot be transcoded to the destination encoding. See section CALLBACKS for details on valid callbacks. -c Omit invalid characters from the output. Same as --to-callback skip. --from-callback callback Use callback to handle characters that cannot be transcoded from the original encoding. See section CALLBACKS for details on valid callbacks. -i Ignore invalid sequences in the input. Same as --from-callback skip. --callback callback Use callback to handle both characters that cannot be transcoded from the original encoding and characters that cannot be transcoded to the destination encoding. See section CALLBACKS for details on valid callbacks."
            },
            {
                "flag": "",
                "long": "--fallback",
                "arg": null,
                "description": "Use the fallback mapping when transcoding from Unicode to the destination encoding."
            },
            {
                "flag": "",
                "long": "--no-fallback",
                "arg": null,
                "description": "Do not use the fallback mapping when transcoding from Unicode to the destination encoding. This is the default. -b, --block-size size Read input in blocks of size bytes at a time. The default block size is 4096. -f, --from-code encoding Set the original encoding of the data to encoding. -t, --to-code encoding Transcode the data to encoding."
            },
            {
                "flag": "",
                "long": "--add-signature",
                "arg": null,
                "description": "Add a U+FEFF Unicode signature character (BOM) if the output charset supports it and does not add one anyway."
            },
            {
                "flag": "",
                "long": "--remove-signature",
                "arg": null,
                "description": "Remove a U+FEFF Unicode signature character (BOM). -o, --output file Write the transcoded data to file."
            }
        ],
        "examples": [
            "Convert data from a given encoding to the platform encoding:",
            "$ uconv -f encoding",
            "Check if a file contains valid data for a given encoding:",
            "$ uconv -f encoding -c file >/dev/null",
            "Convert  a UTF-8 file to a given encoding and ensure that the resulting",
            "text is good for any version of HTML:",
            "$ uconv -f utf-8 -t encoding \\",
            "--callback escape-xml-dec file",
            "Display the names of the Unicode code points in a UTF-file:",
            "$ uconv -f utf-8 -x any-name file",
            "Print the name of a Unicode code point whose value is known (U+30AB  in",
            "this example):",
            "$ echo '\\u30ab' | uconv -x 'hex-any; any-name'; echo",
            "{KATAKANA LETTER KA}{LINE FEED}",
            "(The  names  are delimited by curly braces.  Also, the name of the line",
            "terminator is also displayed.)",
            "Normalize UTF-8 data using Unicode NFKC, remove all control characters,",
            "and map Katakana to Hiragana:",
            "$ uconv -f utf-8 -t utf-8 \\",
            "-x '::nfkc; [:Cc:] >; ::katakana-hiragana;'"
        ],
        "see_also": [
            {
                "name": "iconv",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/iconv/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 33,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "-V, --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-s, --silent",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v, --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-l, --list",
                        "lines": 6,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "--default-code",
                        "lines": 2,
                        "long": "--default-code"
                    },
                    {
                        "name": "-L, --list-transliterators",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--list-transliterators"
                    },
                    {
                        "name": "--canon",
                        "lines": 32,
                        "long": "--canon"
                    },
                    {
                        "name": "--fallback",
                        "lines": 3,
                        "long": "--fallback"
                    },
                    {
                        "name": "--no-fallback",
                        "lines": 13,
                        "long": "--no-fallback"
                    },
                    {
                        "name": "--add-signature",
                        "lines": 3,
                        "long": "--add-signature"
                    },
                    {
                        "name": "--remove-signature",
                        "lines": 5,
                        "long": "--remove-signature"
                    }
                ]
            },
            {
                "name": "CALLBACKS",
                "lines": 61,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 34,
                "subsections": []
            },
            {
                "name": "CAVEATS AND BUGS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "uconv - convert data from one encoding to another\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "uconv  [  -h,  -?,  --help  ]  [ -V, --version ] [ -s, --silent ] [ -v,\n--verbose ] [ -l, --list | -l, --list-code code | --default-code |  -L,\n--list-transliterators   ]  [  --canon  ]  [  -x  transliteration  ]  [\n--to-callback callback | -c ] [  --from-callback  callback  |  -i  ]  [\n--callback callback ] [ --fallback | --no-fallback ] [ -b, --block-size\nsize ] [ -f, --from-code encoding  ]  [  -t,  --to-code  encoding  ]  [\n--add-signature  ]  [  --remove-signature  ]  [  -o,  --output file ] [\nfile...  ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "uconv converts, or transcodes, each given file (or its  standard  input\nif no file is specified) from one encoding to another.  The transcoding\nis done using Unicode as a pivot encoding  (i.e.  the  data  are  first\ntranscoded  from their original encoding to Unicode, and then from Uni-\ncode to the destination encoding).\n\nIf an encoding is not specified or is -, the default encoding is  used.\nThus,  calling  uconv with no encoding provides an easy way to validate\nand sanitize data files for further consumption by tools requiring data\nin the default encoding.\n\nWhen  calling  uconv, it is possible to specify callbacks that are used\nto handle invalid characters in the input, or characters that cannot be\ntranscoded  to  the  destination encoding. Some encodings, for example,\noffer a default substitution character that can be  used  to  represent\nthe occurrence of such characters in the input. Other callbacks offer a\nuseful visual representation of the invalid data.\n\nuconv can also run the  specified  transliteration  on  the  transcoded\ndata,  in  which  case  transliteration  will happen as an intermediate\nstep, after the data have been transcoded to Unicode.  The translitera-\ntion  can be either a list of semicolon-separated transliterator names,\nor an arbitrarily complex set of rules in the ICU transliteration rules\nformat.\n\nFor  transcoding  purposes,  uconv options are compatible with those of\niconv(1), making it easy to replace it in scripts. It is not  necessar-\nily  the  case,  however, that the encoding names used by uconv and ICU\nare the same as the ones used by iconv(1).  Also, options that  provide\ninformational data, such as the -l, --list one offered by some iconv(1)\nvariants such as GNU's, produce data in a slightly different and easier\nto parse format.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-h, -?, --help\nPrint help about usage and exit.\n",
                "subsections": [
                    {
                        "name": "-V, --version",
                        "content": "Print the version of uconv and exit.\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-s, --silent",
                        "content": "Suppress messages during execution.\n",
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "-v, --verbose",
                        "content": "Display extra informative messages during execution.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-l, --list",
                        "content": "List all the available encodings and exit.\n\n-l, --list-code code\nList  only  the  code encoding and exit. If code is not a proper\nencoding, exit with an error.\n",
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "--default-code",
                        "content": "List only the name of the default encoding and exit.\n",
                        "long": "--default-code"
                    },
                    {
                        "name": "-L, --list-transliterators",
                        "content": "List all the available transliterators and exit.\n",
                        "flag": "-L",
                        "long": "--list-transliterators"
                    },
                    {
                        "name": "--canon",
                        "content": "If used with -l, --list or --default-code, the list of encodings\nis  produced  in  a  format compatible with convrtrs.txt(5).  If\nused with -L, --list-transliterators, print only one transliter-\nator name per line.\n\n-x transliteration\nRun  the  given  transliteration on the transcoded Unicode data,\nand use the transliterated data as input for the transcoding  to\nthe destination encoding.\n\n--to-callback callback\nUse  callback  to handle characters that cannot be transcoded to\nthe destination encoding. See section CALLBACKS for  details  on\nvalid callbacks.\n\n-c     Omit  invalid characters from the output.  Same as --to-callback\nskip.\n\n--from-callback callback\nUse callback to handle characters that cannot be transcoded from\nthe  original  encoding.  See  section  CALLBACKS for details on\nvalid callbacks.\n\n-i     Ignore invalid sequences in the input.  Same as  --from-callback\nskip.\n\n--callback callback\nUse callback to handle both characters that cannot be transcoded\nfrom  the  original  encoding  and  characters  that  cannot  be\ntranscoded  to  the  destination encoding. See section CALLBACKS\nfor details on valid callbacks.\n",
                        "long": "--canon"
                    },
                    {
                        "name": "--fallback",
                        "content": "Use the fallback mapping when transcoding from  Unicode  to  the\ndestination encoding.\n",
                        "long": "--fallback"
                    },
                    {
                        "name": "--no-fallback",
                        "content": "Do not use the fallback mapping when transcoding from Unicode to\nthe destination encoding.  This is the default.\n\n-b, --block-size size\nRead input in blocks of size bytes at a time. The default  block\nsize is 4096.\n\n-f, --from-code encoding\nSet the original encoding of the data to encoding.\n\n-t, --to-code encoding\nTranscode the data to encoding.\n",
                        "long": "--no-fallback"
                    },
                    {
                        "name": "--add-signature",
                        "content": "Add  a  U+FEFF  Unicode  signature character (BOM) if the output\ncharset supports it and does not add one anyway.\n",
                        "long": "--add-signature"
                    },
                    {
                        "name": "--remove-signature",
                        "content": "Remove a U+FEFF Unicode signature character (BOM).\n\n-o, --output file\nWrite the transcoded data to file.\n",
                        "long": "--remove-signature"
                    }
                ]
            },
            "CALLBACKS": {
                "content": "uconv supports specifying callbacks to handle invalid  data.  Callbacks\ncan be set for both directions of transcoding: from the original encod-\ning to Unicode, with the --from-callback option, and  from  Unicode  to\nthe destination encoding, with the --to-callback option.\n\nThe  following is a list of valid callback names, along with a descrip-\ntion of their behavior. The list of  callbacks  actually  supported  by\nuconv is displayed when it is called with -h, --help.\n\nsubstitute       Write  the encoding's substitute sequence, or the Uni-\ncode replacement character U+FFFD when transcoding  to\nUnicode.\n\nskip             Ignore the invalid data.\n\nstop             Stop  with  an  error  when encountering invalid data.\nThis is the default callback.\n\nescape           Same as escape-icu.\n\nescape-icu       Replace the missing characters with a  string  of  the\nformat %Uhhhh for plane 0 characters, and %Uhhhh%Uhhhh\nfor planes 1 and above characters, where hhhh  is  the\nhexadecimal value of one of the UTF-16 code units rep-\nresenting the character. Characters from planes 1  and\nabove  are  written as a pair of UTF-16 surrogate code\nunits.\n\nescape-java      Replace the missing characters with a  string  of  the\nformat \\uhhhh for plane 0 characters, and \\uhhhh\\uhhhh\nfor planes 1 and above characters, where hhhh  is  the\nhexadecimal value of one of the UTF-16 code units rep-\nresenting the character. Characters from planes 1  and\nabove  are  written as a pair of UTF-16 surrogate code\nunits.\n\nescape-c         Replace the missing characters with a  string  of  the\nformat  \\uhhhh  for plane 0 characters, and \\Uhhhhhhhh\nfor planes 1 and above characters, where hhhh and hhh-\nhhhhh  are the hexadecimal values of the Unicode code-\npoint.\n\nescape-xml       Same as escape-xml-hex.\n\nescape-xml-hex   Replace the missing characters with a  string  of  the\nformat  &#xhhhh;,  where hhhh is the hexadecimal value\nof the Unicode codepoint.\n\nescape-xml-dec   Replace the missing characters with a  string  of  the\nformat &#nnnn;, where nnnn is the decimal value of the\nUnicode codepoint.\n\nescape-unicode   Replace the missing characters with a  string  of  the\nformat  {U+hhhh},  where hhhh is the hexadecimal value\nof the Unicode codepoint.  That hexadecimal string  is\nof  variable  length  and  can use from 4 to 6 digits.\nThis is the format universally used to denote  a  Uni-\ncode  codepoint  in the literature, delimited by curly\nbraces for easy recognition of those substitutions  in\nthe output.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Convert data from a given encoding to the platform encoding:\n\n$ uconv -f encoding\n\nCheck if a file contains valid data for a given encoding:\n\n$ uconv -f encoding -c file >/dev/null\n\nConvert  a UTF-8 file to a given encoding and ensure that the resulting\ntext is good for any version of HTML:\n\n$ uconv -f utf-8 -t encoding \\\n--callback escape-xml-dec file\n\nDisplay the names of the Unicode code points in a UTF-file:\n\n$ uconv -f utf-8 -x any-name file\n\nPrint the name of a Unicode code point whose value is known (U+30AB  in\nthis example):\n\n$ echo '\\u30ab' | uconv -x 'hex-any; any-name'; echo\n{KATAKANA LETTER KA}{LINE FEED}\n$\n\n(The  names  are delimited by curly braces.  Also, the name of the line\nterminator is also displayed.)\n\nNormalize UTF-8 data using Unicode NFKC, remove all control characters,\nand map Katakana to Hiragana:\n\n$ uconv -f utf-8 -t utf-8 \\\n-x '::nfkc; [:Cc:] >; ::katakana-hiragana;'\n",
                "subsections": []
            },
            "CAVEATS AND BUGS": {
                "content": "uconv does report errors as occurring at the first invalid byte encoun-\ntered. This may be confusing to users of GNU  iconv(1),  which  reports\nerrors  as  occurring  at  the  first  byte of an invalid sequence. For\nmulti-byte character sets or encodings, this means that uconv error po-\nsitions  may be at a later offset in the input stream than would be the\ncase with GNU iconv(1).\n\nThe reporting of error positions when a transliterator is used  may  be\ninaccurate  or  unavailable, in which case uconv will report the offset\nin the output stream at which the error occurred.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Jonas Utterstroem\nYves Arrouye\n",
                "subsections": []
            },
            "VERSION": {
                "content": "70.1\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 2000-2005 IBM, Inc. and others.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "iconv(1)\n\nICU MANPAGE                       2005-jul-1                          UCONV(1)",
                "subsections": []
            }
        }
    }
}