123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- <!-- Creator : groff version 1.18.1 -->
- <!-- CreationDate: Tue Jun 30 22:52:08 2009 -->
- <html>
- <head>
- <meta name="generator" content="groff -Thtml, see www.gnu.org">
- <meta name="Content-Style" content="text/css">
- <title>ICONV_OPEN</title>
- </head>
- <body>
- <h1 align=center>ICONV_OPEN</h1>
- <a href="#NAME">NAME</a><br>
- <a href="#SYNOPSIS">SYNOPSIS</a><br>
- <a href="#DESCRIPTION">DESCRIPTION</a><br>
- <a href="#RETURN VALUE">RETURN VALUE</a><br>
- <a href="#ERRORS">ERRORS</a><br>
- <a href="#CONFORMING TO">CONFORMING TO</a><br>
- <a href="#SEE ALSO">SEE ALSO</a><br>
- <hr>
- <a name="NAME"></a>
- <h2>NAME</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>iconv_open − allocate descriptor for character set
- conversion</p>
- </td>
- </table>
- <a name="SYNOPSIS"></a>
- <h2>SYNOPSIS</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <pre><b>#include <iconv.h>
- iconv_t iconv_open (const char*</b> <i>tocode</i><b>, const char*</b> <i>fromcode</i><b>);
- </b></pre>
- </td>
- </table>
- <a name="DESCRIPTION"></a>
- <h2>DESCRIPTION</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>The <b>iconv_open</b> function allocates a conversion
- descriptor suitable for converting byte sequences from
- character encoding <i>fromcode</i> to character encoding
- <i>tocode</i>.</p>
- <!-- INDENTATION -->
- <p>The values permitted for <i>fromcode</i> and
- <i>tocode</i> and the supported combinations are system
- dependent. For the libiconv library, the following encodings
- are supported, in all combinations.</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>European languages</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>ASCII,
- ISO−8859−{1,2,3,4,5,7,9,10,13,14,15,16},
- KOI8−R, KOI8−U, KOI8−RU,
- CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
- Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
- Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Semitic languages</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>ISO−8859−{6,8}, CP{1255,1256}, CP862,
- Mac{Hebrew,Arabic}</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Japanese</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>EUC−JP, SHIFT_JIS, CP932, ISO−2022−JP,
- ISO−2022−JP−2,
- ISO−2022−JP−1</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Chinese</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>EUC−CN, HZ, GBK, CP936, GB18030, EUC−TW,
- BIG5, CP950, BIG5−HKSCS, BIG5−HKSCS:2001,
- BIG5−HKSCS:1999, ISO−2022−CN,
- ISO−2022−CN−EXT</p>
- </td>
- </table>
- <!-- TABS -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="3" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="11%"></td>
- <td width="8%">
- <p>Korean</p>
- </td>
- <td width="79%">
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>EUC−KR, CP949, ISO−2022−KR, JOHAB</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Armenian</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>ARMSCII−8</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Georgian</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>Georgian−Academy, Georgian−PS</p>
- </td>
- </table>
- <!-- TABS -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="3" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="11%"></td>
- <td width="7%">
- <p>Tajik</p>
- </td>
- <td width="80%">
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>KOI8−T</p>
- </td>
- </table>
- <!-- TABS -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="3" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="11%"></td>
- <td width="8%">
- <p>Kazakh</p>
- </td>
- <td width="79%">
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>PT154, RK1048</p>
- </td>
- </table>
- <!-- TABS -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="3" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="11%"></td>
- <td width="5%">
- <p>Thai</p>
- </td>
- <td width="82%">
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>TIS−620, CP874, MacThai</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Laotian</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>MuleLao−1, CP1133</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Vietnamese</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>VISCII, TCVN, CP1258</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Platform specifics</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>HP−ROMAN8, NEXTSTEP</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Full Unicode</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>UTF−8</p>
- <!-- INDENTATION -->
- <p>UCS−2, UCS−2BE, UCS−2LE</p>
- <!-- INDENTATION -->
- <p>UCS−4, UCS−4BE, UCS−4LE</p>
- <!-- INDENTATION -->
- <p>UTF−16, UTF−16BE, UTF−16LE</p>
- <!-- INDENTATION -->
- <p>UTF−32, UTF−32BE, UTF−32LE</p>
- <!-- INDENTATION -->
- <p>UTF−7</p>
- <!-- INDENTATION -->
- <p>C99, JAVA</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Full Unicode, in terms of <b>uint16_t</b> or
- <b>uint32_t</b></p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>(with machine dependent endianness and alignment)</p>
- <!-- INDENTATION -->
- <p>UCS−2−INTERNAL,
- UCS−4−INTERNAL</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Locale dependent, in terms of <b>char</b> or
- <b>wchar_t</b></p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>(with machine dependent endianness and alignment, and
- with semantics depending on the OS and the current LC_CTYPE
- locale facet)</p>
- <!-- INDENTATION -->
- <p>char, wchar_t</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>When configured with the option
- <b>−−enable−extra−encodings</b>, it
- also provides support for a few extra encodings:</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>European languages</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <pre>CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
- </pre>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Semitic languages</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>CP864</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Japanese</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>EUC−JISX0213, Shift_JISX0213,
- ISO−2022−JP−3</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Chinese</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>BIG5−2003 (experimental)</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Turkmen</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>TDS565</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>Platform specifics</p></td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="21%"></td>
- <td width="77%">
- <p>ATARIST, RISCOS−LATIN1</p>
- </td>
- </table>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>The empty encoding name "" is equivalent to
- "char": it denotes the locale dependent character
- encoding.</p>
- <!-- INDENTATION -->
- <p>When the string "//TRANSLIT" is appended to
- <i>tocode</i>, transliteration is activated. This means that
- when a character cannot be represented in the target
- character set, it can be approximated through one or several
- characters that look similar to the original character.</p>
- <!-- INDENTATION -->
- <p>When the string "//IGNORE" is appended to
- <i>tocode</i>, characters that cannot be represented in the
- target character set will be silently discarded.</p>
- <!-- INDENTATION -->
- <p>The resulting conversion descriptor can be used with
- <b>iconv</b> any number of times. It remains valid until
- deallocated using <b>iconv_close</b>.</p>
- <!-- INDENTATION -->
- <p>A conversion descriptor contains a conversion state.
- After creation using <b>iconv_open</b>, the state is in the
- initial state. Using <b>iconv</b> modifies the
- descriptor’s conversion state. (This implies that a
- conversion descriptor can not be used in multiple threads
- simultaneously.) To bring the state back to the initial
- state, use <b>iconv</b> with NULL as <i>inbuf</i>
- argument.</p>
- </td>
- </table>
- <a name="RETURN VALUE"></a>
- <h2>RETURN VALUE</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>The <b>iconv_open</b> function returns a freshly
- allocated conversion descriptor. In case of error, it sets
- <b>errno</b> and returns (iconv_t)(−1).</p>
- </td>
- </table>
- <a name="ERRORS"></a>
- <h2>ERRORS</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>The following error can occur, among others:</p>
- </td>
- </table>
- <!-- TABS -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="4" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="11%"></td>
- <td width="8%">
- <p><b>EINVAL</b></p>
- </td>
- <td width="1%"></td>
- <td width="77%">
- <p>The conversion from <i>fromcode</i> to <i>tocode</i> is
- not supported by the implementation.</p>
- </td>
- </table>
- <a name="CONFORMING TO"></a>
- <h2>CONFORMING TO</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p>POSIX:2001</p>
- </td>
- </table>
- <a name="SEE ALSO"></a>
- <h2>SEE ALSO</h2>
- <!-- INDENTATION -->
- <table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
- <tr valign="top" align="left">
- <td width="10%"></td>
- <td width="89%">
- <p><b>iconv</b>(3) <b>iconvctl</b>(3)
- <b>iconv_close</b>(3)</p>
- </td>
- </table>
- <hr>
- </body>
- </html>
|