{
    "content": [
        {
            "type": "text",
            "text": "# iconv (info)\n\n## NAME\n\niconv - convert text from one character encoding to another\n\n## SYNOPSIS\n\niconv [options] [-f from-encoding] [-t to-encoding] [inputfile]...\n\n## DESCRIPTION\n\nThe iconv program reads in text in one encoding and outputs the text in\nanother encoding.  If no input files are given, or if it is given as  a\ndash (-), iconv reads from standard input.  If no output file is given,\niconv writes to standard output.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (5 subsections)\n- **EXIT STATUS**\n- **ENVIRONMENT**\n- **FILES**\n- **CONFORMING TO**\n- **EXAMPLES**\n- **SEE ALSO**\n- **COLOPHON**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "iconv",
        "section": "",
        "mode": "info",
        "summary": "iconv - convert text from one character encoding to another",
        "synopsis": "iconv [options] [-f from-encoding] [-t to-encoding] [inputfile]...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-l",
                "long": "--list",
                "arg": null,
                "description": "List all known character set encodings. -c Silently discard characters that cannot be converted instead of terminating when encountering such characters. -o outputfile, --output=outputfile Use outputfile for output."
            },
            {
                "flag": "-s",
                "long": "--silent",
                "arg": null,
                "description": "This option is ignored; it is provided only for compatibility."
            },
            {
                "flag": "",
                "long": "--verbose",
                "arg": null,
                "description": "Print progress information on standard error when processing multiple files. -?, --help Print a usage summary and exit."
            },
            {
                "flag": "",
                "long": "--usage",
                "arg": null,
                "description": "Print a short usage summary and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Print the version number, license, and disclaimer of warranty for iconv."
            }
        ],
        "examples": [
            "Convert text from the ISO 8859-15 character encoding to UTF-8:",
            "$ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt",
            "The  next  example  converts  from UTF-8 to ASCII, transliterating when",
            "possible:",
            "$ echo abc ss <alpha> EUR ac | iconv -f UTF-8 -t ASCII//TRANSLIT",
            "abc ss ? EUR abc"
        ],
        "see_also": [
            {
                "name": "locale",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/locale/1/json"
            },
            {
                "name": "uconv",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/uconv/1/json"
            },
            {
                "name": "nllanginfo",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/nllanginfo/3/json"
            },
            {
                "name": "charsets",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/charsets/7/json"
            },
            {
                "name": "fig",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/fig/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 18,
                "subsections": [
                    {
                        "name": "-l, --list",
                        "lines": 8,
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "-s, --silent",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "--verbose",
                        "lines": 6,
                        "long": "--verbose"
                    },
                    {
                        "name": "--usage",
                        "lines": 2,
                        "long": "--usage"
                    },
                    {
                        "name": "-V, --version",
                        "lines": 3,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "CONFORMING TO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "iconv - convert text from one character encoding to another\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "iconv [options] [-f from-encoding] [-t to-encoding] [inputfile]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The iconv program reads in text in one encoding and outputs the text in\nanother encoding.  If no input files are given, or if it is given as  a\ndash (-), iconv reads from standard input.  If no output file is given,\niconv writes to standard output.\n\nIf no from-encoding is given, the default is derived from  the  current\nlocale's  character  encoding.  If no to-encoding is given, the default\nis derived from the current locale's character encoding.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-f from-encoding, --from-code=from-encoding\nUse from-encoding for input characters.\n\n-t to-encoding, --to-code=to-encoding\nUse to-encoding for output characters.\n\nIf the string //IGNORE is appended  to  to-encoding,  characters\nthat  cannot  be converted are discarded and an error is printed\nafter conversion.\n\nIf the string //TRANSLIT is appended to to-encoding,  characters\nbeing  converted  are  transliterated  when needed and possible.\nThis means that when a character cannot be  represented  in  the\ntarget character set, it can be approximated through one or sev-\neral similar looking characters.  Characters that are outside of\nthe  target  character  set and cannot be transliterated are re-\nplaced with a question mark (?) in the output.\n",
                "subsections": [
                    {
                        "name": "-l, --list",
                        "content": "List all known character set encodings.\n\n-c     Silently discard characters that cannot be converted instead  of\nterminating when encountering such characters.\n\n-o outputfile, --output=outputfile\nUse outputfile for output.\n",
                        "flag": "-l",
                        "long": "--list"
                    },
                    {
                        "name": "-s, --silent",
                        "content": "This option is ignored; it is provided only for compatibility.\n",
                        "flag": "-s",
                        "long": "--silent"
                    },
                    {
                        "name": "--verbose",
                        "content": "Print  progress  information  on  standard error when processing\nmultiple files.\n\n-?, --help\nPrint a usage summary and exit.\n",
                        "long": "--verbose"
                    },
                    {
                        "name": "--usage",
                        "content": "Print a short usage summary and exit.\n",
                        "long": "--usage"
                    },
                    {
                        "name": "-V, --version",
                        "content": "Print the version number, license, and  disclaimer  of  warranty\nfor iconv.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "Zero on success, nonzero on errors.\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "Internally,  the iconv program uses the iconv(3) function which in turn\nuses gconv modules (dynamically loaded shared libraries) to convert  to\nand  from  a character set.  Before calling iconv(3), the iconv program\nmust first allocate a conversion descriptor using  iconvopen(3).   The\noperation  of  the  latter function is influenced by the setting of the\nGCONVPATH environment variable:\n\n*  If GCONVPATH is not set, iconvopen(3) loads the system gconv  mod-\nule  configuration  cache  file  created by iconvconfig(8) and then,\nbased on the configuration, loads the gconv modules needed  to  per-\nform the conversion.  If the system gconv module configuration cache\nfile is not available then the  system  gconv  module  configuration\nfile is used.\n\n*  If  GCONVPATH  is defined (as a colon-separated list of pathnames),\nthe system gconv module configuration cache is not  used.   Instead,\niconvopen(3) first tries to load the configuration files by search-\ning the directories in GCONVPATH in order, followed by  the  system\ndefault  gconv  module  configuration file.  If a directory does not\ncontain a gconv module configuration file, any gconv modules that it\nmay  contain  are  ignored.   If a directory contains a gconv module\nconfiguration file and it is determined that  a  module  needed  for\nthis  conversion is available in the directory, then the needed mod-\nule is loaded from that directory, the order  being  such  that  the\nfirst  suitable  module  found  in  GCONVPATH is used.  This allows\nusers to use custom modules and even replace system-provided modules\nby providing such modules in GCONVPATH directories.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/usr/lib/gconv\nUsual default gconv module path.\n\n/usr/lib/gconv/gconv-modules\nUsual system default gconv module configuration file.\n\n/usr/lib/gconv/gconv-modules.cache\nUsual system gconv module configuration cache.\n",
                "subsections": []
            },
            "CONFORMING TO": {
                "content": "POSIX.1-2001.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Convert text from the ISO 8859-15 character encoding to UTF-8:\n\n$ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt\n\nThe  next  example  converts  from UTF-8 to ASCII, transliterating when\npossible:\n\n$ echo abc ss <alpha> EUR ac | iconv -f UTF-8 -t ASCII//TRANSLIT\nabc ss ? EUR abc\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "locale(1), uconv(1), iconv(3), nllanginfo(3),  charsets(7),  iconvcon-\nfig(8)\n",
                "subsections": []
            },
            "COLOPHON": {
                "content": "This  page  is  part of release 5.10 of the Linux man-pages project.  A\ndescription of the project, information about reporting bugs,  and  the\nlatest     version     of     this    page,    can    be    found    at\nhttps://www.kernel.org/doc/man-pages/.\n\nGNU                               2020-06-09                          ICONV(1)",
                "subsections": []
            }
        }
    }
}