Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

iconv(1) [mojave man page]

ICONV(1)						     Linux Programmer's Manual							  ICONV(1)

NAME
iconv - character set conversion SYNOPSIS
iconv [OPTION...] [-f encoding] [-t encoding] [inputfile ...] iconv -l DESCRIPTION
The iconv program converts text from one encoding to another encoding. More precisely, it converts from the encoding given for the -f option to the encoding given for the -t option. Either of these encodings defaults to the encoding of the current locale. All the input- files are read and converted in turn; if no inputfile is given, the standard input is used. The converted text is printed to standard out- put. The encodings permitted are system dependent. For the libiconv implementation, they are listed in the iconv_open(3) manual page. Options controlling the input and output format: -f encoding, --from-code=encoding Specifies the encoding of the input. -t encoding, --to-code=encoding Specifies the encoding of the output. Options controlling conversion problems: -c When this option is given, characters that cannot be converted are silently discarded, instead of leading to a conversion error. --unicode-subst=formatstring When this option is given, Unicode characters that cannot be represented in the target encoding are replaced with a placeholder string that is constructed from the given formatstring, applied to the Unicode code point. The formatstring must be a format string in the same format as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer argument. --byte-subst=formatstring When this option is given, bytes in the input that are not valid in the source encoding are replaced with a placeholder string that is constructed from the given formatstring, applied to the byte's value. The formatstring must be a format string in the same format as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer argument. --widechar-subst=formatstring When this option is given, wide characters in the input that are not valid in the source encoding are replaced with a placeholder string that is constructed from the given formatstring, applied to the byte's value. The formatstring must be a format string in the same format as for the printf command or the printf() function, taking either no argument or exactly one unsigned integer argument. Options controlling error output: -s, --silent When this option is given, error messages about invalid or unconvertible characters are omitted, but the actual converted text is unaffected. The iconv -l or iconv --list command lists the names of the supported encodings, in a system dependent format. For the libiconv implementa- tion, the names are printed in upper case, separated by whitespace, and alias names of an encoding are listed on the same line as the encoding itself. EXAMPLES
iconv -f ISO-8859-1 -t UTF-8 converts input from the old West-European encoding ISO-8859-1 to Unicode. iconv -f KOI8-R --byte-subst="<0x%x>" --unicode-subst="<U+%04X>" converts input from the old Russian encoding KOI8-R to the locale encoding, substituting an angle bracket notation with hexadecimal numbers for invalid bytes and for valid but unconvertible characters. iconv --list lists the supported encodings. SEE ALSO
iconv_open(3) GNU
January 22, 2006 ICONV(1)

Check Out this Related Man Page

YAZ-ICONV(1)							     Commands							      YAZ-ICONV(1)

NAME
yaz-iconv - YAZ Character set conversion utility SYNOPSIS
yaz-iconv [-f from] [-t to] [-v] [file...] DESCRIPTION
yaz-iconv converts data in file in character set specified by from to output in character set as specified by to. This yaz-iconv utility similar to the iconv found on many POSIX systems (Glibc, Solaris, etc). If no file is specified, yaz-iconv reads from standard input. OPTIONS
-ffrom] Specify the character set from of the input file. Should be used in conjunction with option -t. -tto] Specify the character set of of the output. Should be used in conjunction with option -f. -v Print more information about the conversion process. ENCODINGS
The yaz-iconv command and the API as defined in yaz/yaz-iconv.h is a wrapper for the library system call iconv. But YAZ' iconv utility also implements conversions on its own. The table below lists characters sets (or encodings). that are supported by YAZ. Each character set is marked with either encode or decode. If an encoding is encode-enabled YAZ may convert to to the designated encoding. If an encoding is decode-enabled, YAZ may convert from the designated encoding. marc8 (encode, decode) The MARC8[1] encoding as defined by the Library of Congress. Most MARC21/USMARC records usees this encoding. marc8s (encode, decode) Like MARC8 but with conversion prefers non-combined characters in the Latin-1 plane over combined characters. marc8lossy (encode) Lossy encoding of MARC-8. marc8lossless (encode) Lossless encoding of MARC8. utf8 (encode, decode) The most commonly used UNICODE encoding on the Internet. iso8859-1 (encode, decode) ISO-8859-1, AKA Latin-1. iso5426 (decode) ISO 5426. Some MARC records (UNIMARC) uses this encoding. iso5428:1984 (encode, decode) ISO 5428:1984. advancegreek (encode, decode) An encoding for Greek used by some vendors (Advance). danmarc (decode) Danmarc (in danish)[2] is an encoding based on UNICODE which is used for DanMARC2 records. EXAMPLES
The following command converts from ISO-8859-1 (Latin-1) to UTF-8. yaz-iconv -f ISO-8859-1 -t UTF-8 -X <input.lst >output.lst FILES
prefix/bin/yaz-iconv prefix/include/yaz/yaz-iconv.h SEE ALSO
yaz(7) iconv(1) NOTES
1. MARC8 http://www.loc.gov/marc/specifications/speccharmarc8.html 2. Danmarc (in danish) http://www.kat-format.dk/danMARC2/Danmarc2.4.htm#felt+Indl.+4 YAZ 4.2.30 04/16/2012 YAZ-ICONV(1)
Man Page