In Unix-like operating systems, iconv (international conversion) is a command-line program and a standardized application programming interface (API) used to convert between different character encodings. "It can convert from any of these encodings to any other, through Unicode conversion."
All recent Linux distributions contain a free implementation of iconv utility and
iconv() function as part of the GNU C Library which is the C library for current Linux systems. The library's iconv() function as well as the utility is licensed as LGPL, so it is linkable with closed source applications. To use the library, the GNU glibc locales need to be installed,  normally installed by default.
GNU also provides a separate iconv implementation in its "libiconv" package. Unlike the glibc implementation, the utility in "libiconv" is licensed under GPL, so derivatives must be open in GPL too. This separate implementation can be seen in non-glibc platforms that still need iconv functionalities like Cygwin and GnuWin32.
Under Microsoft Windows, the iconv library and the utility is provided by GNU's libiconv found in Cygwin and GnuWin32 environments; there is also a "purely Win32" implementation called "win-iconv" that uses Windows' built-in routines for conversion.
The iconv function is also available for many programming languages.
iconv -f iso-8859-1
An input file
infile can be converted from ISO-8859-1 to UTF-8 and output to output file
iconv -f iso-8859-1 -t utf-8 <infile >outfile
- iconv (utility) OpenGroup Standards page
- iconv() OpenGroup Standards page
- gnu.org: libiconv
- "glibc: iconv/iconv.c". Retrieved 30 November 2016.
- "glibc: iconv/iconv_prog.c". Retrieved 30 November 2016.
- "Cygwin Package Search: libiconv". Archived from the original on 30 November 2016. Retrieved 30 November 2016.
- GnuWin32: libiconv
- "win32-iconv". GitHub. Retrieved 30 November 2016.
- IBM knowledge base: iconv examples
|This Unix-related article is a stub. You can help Wikipedia by expanding it.|