Iconv

iconvOriginal author(s)| Hewlett-Packard

|

Developer(s)| Various open-source and commercial developers
Repository| https://git.savannah.gnu.org/git/libiconv.git
Operating system| Unix, Unix-like, Microsoft Windows, IBM i
Platform| Cross-platform
Type| Command
License| libiconv: LGPL
iconv: GPL
win-iconv: Public domain[1]

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]

## Contents

* 1 History
* 2 Implementations
* 2.1 Support
* 2.2 Ports
* 3 Usage
* 4 See also
* 5 References
* 6 External links

## History

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

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, 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.[5]

### Ports

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

`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

* uconv
* luit
* List of Unix commands
* International Components for Unicode

## References

1. ↑ "win-iconv/readme.txt at master · win-iconv/win-iconv · GitHub". https://github.com/win-iconv/win-iconv/blob/master/readme.txt.
2. ↑ "R: Convert Character Vector between Encodings". http://astrostatistics.psu.edu/su07/R/html/base/html/iconv.html.
3. ↑ "iconv". http://pubs.opengroup.org/onlinepubs/9699919799/utilities/iconv.html.
4. ↑ "iconv". http://www.opengroup.org/onlinepubs/009695399/functions/iconv.html.
5. ↑ 5.0 5.1 "libiconv - GNU Project - Free Software Foundation (FSF)". https://www.gnu.org/software/libiconv/.
6. ↑ "iconv(3C)". http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/iconv.3C.html.
7. ↑ "glibc: iconv/iconv.c". https://sourceware.org/git/?p=glibc.git;a=blob;f=iconv/iconv.c.
8. ↑ "glibc: iconv/iconv_prog.c". https://sourceware.org/git/?p=glibc.git;a=blob;f=iconv/iconv_prog.c.
9. ↑ "Cygwin Package Search: libiconv". https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libiconv.
10. ↑ "LibIconv for Windows". https://gnuwin32.sourceforge.net/packages/libiconv.htm.
11. ↑ "win32-iconv". https://github.com/win-iconv/win-iconv.
12. ↑ IBM. "IBM System i Version 7.2 Programming Qshell" (in en). https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rzahz/rzahzpdf.pdf?view=kc.
13. ↑ "IBM Knowledge Center". http://www-01.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.cmds/doc/aixcmds3/iconv.htm.

## External links

| The Wikibook Guide to Unix has a page on the topic of: Commands

|

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

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* sed
* sort
* strings
* tail
* tr
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

Template:Hewlett-Packard software

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Iconv. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Iconv&oldid=4291580"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template