The iconv command converts characters in file (or from standard input if no file is specified) from one code set to another. The converted text is written to standard output. iconv uses both code sets stored in internal tables and code sets in stored as external files. When a code set is specified, iconv first searches its internal table. If the code set is not in the internal table and the code set name is an absolute path name, iconv looks for that file. If the code set is not in the internal table and the file looks like a relative path name, iconv treats it as a file name in the directory library/iconv, where library is the library directory. (On Windows systems, this is ROOTDIR/etc/iconv.)
If the input contains a character which is invalid in the source code set,
iconv replaces it with the byte 0xff and
continues, unless the
cleans away characters which had conversion errors; these characters are not written to the output. By default, characters not in the source character set are converted to the value 0xff and written to the output.
specifies the current code set of the input. oldset can be either the code set name or a path name to a file containing an external code set.
lists code sets in the internal table. This option is not available on all systems; it depends upon the system's implementation of the
suppresses all error messages about faulty encodings.
specifies the destination code set for the output. newset can be either the code set name or a path name to a file containing an external code set.
specifies verbose output. When used with
-l, the list of code sets includes brief explanatory names.
To convert the file words.txt from the ISO 8859-1 standard code set to the CP 437 standard code set, and store in converted:
iconv -f ISO8859-1 -t CP437 words.txt > converted
Directory searched for external code set files on Windows systems. These external code set files must have the character table in byte-reversed (little endian) order.
Possible exit status values are:
Failure due to any of the following:
Input contained a character sequence which is illegal in the source code set.
Windows Server 2012. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019.
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.3 Documentation Build 39.