fbpx
Wikipedia

iconv

In Unix and Unix-like operating systems, iconv (an abbreviation of internationalization conversion)[2] is a command-line program[3] and a standardized application programming interface (API)[4] used to convert between different character encodings. "It can convert from any of these encodings to any other, through Unicode conversion."[5]

History edit

Initially appearing on the HP-UX operating system,[6]iconv() as well as the utility was standardized within XPG4 and is part of the Single UNIX Specification (SUS).

Implementations edit

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[7] 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.[8] 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, first appeared in December 2004.

Support edit

Currently, over a hundred different character encodings are supported.[5]

Ports edit

Under Microsoft Windows, the iconv library and the utility is provided by GNU's libiconv found in Cygwin[9] and GnuWin32[10] environments; there is also a "purely Win32" implementation called "win-iconv" that uses Windows' built-in routines for conversion.[11] The iconv function is also available for many programming languages.

The iconv command has also been ported to the IBM i operating system.[12]

Usage edit

stdin can be converted from ISO-8859-1 to current locale and output to stdout using:[13]

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 edit

References edit

  1. ^ "win-iconv/readme.txt at master · win-iconv/win-iconv · GitHub".
  2. ^ "R: Convert Character Vector between Encodings". astrostatistics.psu.edu. Retrieved 21 April 2018.
  3. ^ "iconv". pubs.opengroup.org. Retrieved 21 April 2018.
  4. ^ "iconv". www.opengroup.org. Retrieved 21 April 2018.
  5. ^ a b "libiconv - GNU Project - Free Software Foundation (FSF)". www.gnu.org. Retrieved 21 April 2018.
  6. ^ "iconv(3C)". docstore.mik.ua. Retrieved 21 April 2018.
  7. ^ "glibc: iconv/iconv.c". Retrieved 30 November 2016.[permanent dead link]
  8. ^ "glibc: iconv/iconv_prog.c". Retrieved 30 November 2016.[permanent dead link]
  9. ^ "Cygwin Package Search: libiconv". Archived from the original on 30 November 2016. Retrieved 30 November 2016.
  10. ^ "LibIconv for Windows". gnuwin32.sourceforge.net. Retrieved 21 April 2018.
  11. ^ "win32-iconv". GitHub. Retrieved 30 November 2016.
  12. ^ IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). Retrieved 5 September 2020.
  13. ^ "IBM Knowledge Center". www-01.ibm.com. Retrieved 21 April 2018.

External links edit

  • iconv() OpenGroup Standards page
  • GNU libiconv, code
  • win_iconv

iconv, unix, unix, like, operating, systems, abbreviation, internationalization, conversion, command, line, program, standardized, application, programming, interface, used, convert, between, different, character, encodings, convert, from, these, encodings, ot. In Unix and Unix like operating systems iconv an abbreviation of internationalization conversion 2 is a command line program 3 and a standardized application programming interface API 4 used to convert between different character encodings It can convert from any of these encodings to any other through Unicode conversion 5 iconvOriginal author s Hewlett PackardDeveloper s Various open source and commercial developersRepositoryhttps git savannah gnu org git libiconv gitOperating systemUnix Unix like Microsoft Windows IBM iPlatformCross platformTypeCommandLicenselibiconv LGPLiconv GPLwin iconv Public domain 1 Contents 1 History 2 Implementations 2 1 Support 2 2 Ports 3 Usage 4 See also 5 References 6 External linksHistory editInitially appearing on the HP UX operating system 6 iconv as well as the utility was standardized within XPG4 and is part of the Single UNIX Specification SUS Implementations editMost 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 7 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 8 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 first appeared in December 2004 Support edit Currently over a hundred different character encodings are supported 5 Ports edit Under Microsoft Windows the iconv library and the utility is provided by GNU s libiconv found in Cygwin 9 and GnuWin32 10 environments there is also a purely Win32 implementation called win iconv that uses Windows built in routines for conversion 11 The iconv function is also available for many programming languages The iconv command has also been ported to the IBM i operating system 12 Usage edit a href Stdin html class mw redirect title Stdin stdin a can be converted from ISO 8859 1 to current locale and output to a href Stdout html class mw redirect title Stdout stdout a using 13 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 lt infile gt o lt outfile gt See also edituconv luit List of Unix commands International Components for UnicodeReferences edit win iconv readme txt at master win iconv win iconv GitHub R Convert Character Vector between Encodings astrostatistics psu edu Retrieved 21 April 2018 iconv pubs opengroup org Retrieved 21 April 2018 iconv www opengroup org Retrieved 21 April 2018 a b libiconv GNU Project Free Software Foundation FSF www gnu org Retrieved 21 April 2018 iconv 3C docstore mik ua Retrieved 21 April 2018 glibc iconv iconv c Retrieved 30 November 2016 permanent dead link glibc iconv iconv prog c Retrieved 30 November 2016 permanent dead link Cygwin Package Search libiconv Archived from the original on 30 November 2016 Retrieved 30 November 2016 LibIconv for Windows gnuwin32 sourceforge net Retrieved 21 April 2018 win32 iconv GitHub Retrieved 30 November 2016 IBM IBM System i Version 7 2 Programming Qshell PDF Retrieved 5 September 2020 IBM Knowledge Center www 01 ibm com Retrieved 21 April 2018 External links edit nbsp The Wikibook Guide to Unix has a page on the topic of Commands iconv OpenGroup Standards page GNU libiconv code win iconv nbsp This Unix related article is a stub You can help Wikipedia by expanding it vte Retrieved from https en wikipedia org w index php title Iconv amp oldid 1139726694, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.