iconv is a computer program and a standardized API used to convert between different character encodings.
Contents |
iconv API
The iconv API is the standard programming interface for converting character strings from one character encoding to another in Unix-like operating systems. Initially appearing on the HP-UX operating system, it was standardized within XPG4 and is part of the Single UNIX Specification (SUS).
All recent Linux distributions contain a free implementation of iconv() as part of the GNU C Library which is the C library for current Linux systems. To use it, the GNU glibc locales need to be installed, which are provided as a separate package (usually named glibc-locale) normally installed by default.
Compatibility
Under Windows, the iconv binary (and thus, likely also the API) is provided by the Cygwin and GnuWin32 environments.
iconv is also one of the libraries supported by PHP[1] (also under Windows using a DLL file), so it is possible to use iconv() from a PHP program.
Example
iconv -f ISO-8859-1 -t UTF-8 < input.txt > output.txt
See also
External links
- extensive iconv() HP-UX manual page with example code
- iconv() OpenGroup Standards page
- Online interface to the iconv program
- giconv a graphical interface to a patched libiconv version that recodes ASMO449+ to UTF-8
Implementations of the iconv API:
- GNU libiconv, a free iconv implementation, licensed under the LGPL
- FreeBSD port of iconv
- Citrus, the NetBSD clib implementation, under NetBSD license (assumed)
|
||||||||||||||||||||||||||
| This Unix-related article is a stub. You can help Wikipedia by expanding it. |
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




