Iconv: Difference between revisions
imported>Bender the Bot m →Ports: HTTP to HTTPS for SourceForge |
|||
| Line 43: | Line 43: | ||
=== Ports === | === Ports === | ||
Under [[Microsoft Windows]], the iconv library and the utility is provided by GNU's libiconv found in [[Cygwin]]<ref name="cygwin-libiconv-search">{{cite web|title=Cygwin Package Search: libiconv |url=https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libiconv |access-date=30 November 2016 |archive-url=https://archive.today/20161130001530/https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libiconv |archive-date=30 November 2016 |url-status=dead |df=dmy-all }}</ref><!-- Search result pages are perishable. --> and [[GnuWin32]]<ref name="gnuwin32-libiconv">{{cite web|url= | Under [[Microsoft Windows]], the iconv library and the utility is provided by GNU's libiconv found in [[Cygwin]]<ref name="cygwin-libiconv-search">{{cite web|title=Cygwin Package Search: libiconv |url=https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libiconv |access-date=30 November 2016 |archive-url=https://archive.today/20161130001530/https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libiconv |archive-date=30 November 2016 |url-status=dead |df=dmy-all }}</ref><!-- Search result pages are perishable. --> and [[GnuWin32]]<ref name="gnuwin32-libiconv">{{cite web|url=https://gnuwin32.sourceforge.net/packages/libiconv.htm|title=LibIconv for Windows|website=gnuwin32.sourceforge.net|access-date=21 April 2018}}</ref> environments; there is also a "purely Win32" implementation called "win-iconv" that uses Windows' built-in routines for conversion.<ref name="win-iconv">{{cite web|title=win32-iconv|url=https://github.com/win-iconv/win-iconv|website=GitHub|access-date=30 November 2016}}</ref> The iconv function is also available for many programming languages. | ||
The {{Mono|iconv}} command has also been ported to the [[IBM i]] operating system.<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |author=IBM |website=[[IBM]] |author-link=IBM |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 }}</ref> | The {{Mono|iconv}} command has also been ported to the [[IBM i]] operating system.<ref>{{cite web |title=IBM System i Version 7.2 Programming Qshell |language=en |author=IBM |website=[[IBM]] |author-link=IBM |url=https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc |access-date=2020-09-05 }}</ref> | ||
| Line 76: | Line 76: | ||
{{Unix commands}} | {{Unix commands}} | ||
{{Hewlett-Packard software}} | |||
[[Category:HP software]] | [[Category:HP software]] | ||
| Line 82: | Line 83: | ||
[[Category:IBM i Qshell commands]] | [[Category:IBM i Qshell commands]] | ||
[[Category:C POSIX library]] | [[Category:C POSIX library]] | ||
Latest revision as of 20:47, 9 August 2025
Template:Short description Template:Use dmy dates Template:Lowercase Script error: No such module "Infobox".Template:Template other Script error: No such module "Check for unknown parameters".Script error: No such module "Check for conflicting parameters". In Unix and Unix-like operating systems, iconv (an abbreviation of internationalization conversion)[1] is a command-line program[2] and a standardized application programming interface (API)[3] used to convert between different character encodings. "It can convert from any of these encodings to any other, through Unicode conversion."[4]
History
Initially appearing on the HP-UX operating system,[5]iconv() as well as the utility was standardized within XPG4 and is part of the Single UNIX Specification (SUS).
Implementations
Most Linux distributions provide an implementation, either from the GNU Standard C Library (included since version 2.1, February 1999), or the more traditional GNU libiconv, for systems based on other Standard C Libraries.
The iconv function[6] on both is licensed as LGPL, so it is linkable with closed source applications.
Unlike the libraries, the iconv utility is licensed under GPL in both implementations.[7]
The GNU libiconv implementation is portable, and can be used on various UNIX-like and non-UNIX systems. Version 0.3 dates from December 1999.
The uconv utility from International Components for Unicode provides an iconv-compatible command-line syntax for transcoding.
Most BSD systems use NetBSD's implementation, which first appeared in December 2004.
The musl C library implements the iconv function with support for all encodings specified by the WHATWG Encoding Standard.
Support
Currently, over a hundred different character encodings are supported in the GNU variant.[4]
Ports
Under Microsoft Windows, the iconv library and the utility is provided by GNU's libiconv found in Cygwin[8] and GnuWin32[9] environments; there is also a "purely Win32" implementation called "win-iconv" that uses Windows' built-in routines for conversion.[10] The iconv function is also available for many programming languages.
The <templatestyles src="Mono/styles.css" />iconv command has also been ported to the IBM i operating system.[11]
Usage
stdin can be converted from ISO-8859-1 to current locale and output to stdout using:[12]
iconv -f iso-8859-1
An input file infile can be converted from ISO-8859-1 to UTF-8 and output to output file outfile using:
iconv -f iso-8859-1 -t utf-8 <infile> -o <outfile>
See also
References
<templatestyles src="Reflist/styles.css" />
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ a b Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".Script error: No such module "Unsubst".
- ↑ Script error: No such module "citation/CS1".Script error: No such module "Unsubst".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
Script error: No such module "Check for unknown parameters".
External links
Script error: No such module "Navbox". Template:Hewlett-Packard software