| <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> |
| <!-- Creator : groff version 1.17.2 --> |
| <!-- CreationDate: Thu May 18 14:45:31 2006 --> |
| <a name="NAME"></a> |
| <h2>NAME</h2> |
| <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="90%"> |
| iconv_open - allocate descriptor for character set conversion</td></table> |
| <a name="SYNOPSIS"></a> |
| <h2>SYNOPSIS</h2> |
| |
| <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="90%"> |
| <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> |
| |
| <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="90%"> |
| 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>.</td></table> |
| |
| <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="90%"> |
| 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.</td></table> |
| |
| <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="90%"> |
| European languages</td></table> |
| |
| <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="79%"> |
| 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}, |
| Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, |
| Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</td></table> |
| |
| <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="90%"> |
| Semitic languages</td></table> |
| |
| <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="79%"> |
| ISO-8859-{6,8}, CP{1255,1256}, CP862, |
| Mac{Hebrew,Arabic}</td></table> |
| |
| <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="90%"> |
| Japanese</td></table> |
| |
| <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="79%"> |
| EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, |
| ISO-2022-JP-1</td></table> |
| |
| <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="90%"> |
| Chinese</td></table> |
| |
| <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="79%"> |
| 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</td></table> |
| |
| <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="90%"> |
| Korean</td></table> |
| |
| <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="79%"> |
| EUC-KR, CP949, ISO-2022-KR, JOHAB</td></table> |
| |
| <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="90%"> |
| Armenian</td></table> |
| |
| <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="79%"> |
| ARMSCII-8</td></table> |
| |
| <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="90%"> |
| Georgian</td></table> |
| |
| <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="79%"> |
| Georgian-Academy, Georgian-PS</td></table> |
| |
| <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="90%"> |
| Tajik</td></table> |
| |
| <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="79%"> |
| KOI8-T</td></table> |
| |
| <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="90%"> |
| Kazakh</td></table> |
| |
| <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="79%"> |
| PT154</td></table> |
| |
| <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="90%"> |
| Thai</td></table> |
| |
| <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="79%"> |
| TIS-620, CP874, MacThai</td></table> |
| |
| <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="90%"> |
| Laotian</td></table> |
| |
| <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="79%"> |
| MuleLao-1, CP1133</td></table> |
| |
| <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="90%"> |
| Vietnamese</td></table> |
| |
| <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="79%"> |
| VISCII, TCVN, CP1258</td></table> |
| |
| <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="90%"> |
| Platform specifics</td></table> |
| |
| <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="79%"> |
| HP-ROMAN8, NEXTSTEP</td></table> |
| |
| <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="90%"> |
| Full Unicode</td></table> |
| |
| <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="79%"> |
| UTF-8</td></table> |
| |
| <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="79%"> |
| UCS-2, UCS-2BE, UCS-2LE</td></table> |
| |
| <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="79%"> |
| UCS-4, UCS-4BE, UCS-4LE</td></table> |
| |
| <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="79%"> |
| UTF-16, UTF-16BE, UTF-16LE</td></table> |
| |
| <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="79%"> |
| UTF-32, UTF-32BE, UTF-32LE</td></table> |
| |
| <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="79%"> |
| UTF-7</td></table> |
| |
| <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="79%"> |
| C99, JAVA</td></table> |
| |
| <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="90%"> |
| Full Unicode, in terms of <b>uint16_t</b> or |
| <b>uint32_t</b></td></table> |
| |
| <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="79%"> |
| (with machine dependent endianness and |
| alignment)</td></table> |
| |
| <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="79%"> |
| UCS-2-INTERNAL, UCS-4-INTERNAL</td></table> |
| |
| <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="90%"> |
| Locale dependent, in terms of <b>char</b> or |
| <b>wchar_t</b></td></table> |
| |
| <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="79%"> |
| (with machine dependent endianness and alignment, and with |
| semantics depending on the OS and the current LC_CTYPE |
| locale facet)</td></table> |
| |
| <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="79%"> |
| char, wchar_t</td></table> |
| |
| <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="90%"> |
| When configured with the option |
| <b>--enable-extra-encodings</b>, it also provides support |
| for a few extra encodings:</td></table> |
| |
| <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="90%"> |
| European languages</td></table> |
| |
| <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="79%"> |
| <pre>CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125} |
| </pre></td></table> |
| |
| <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="90%"> |
| Semitic languages</td></table> |
| |
| <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="79%"> |
| CP864</td></table> |
| |
| <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="90%"> |
| Japanese</td></table> |
| |
| <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="79%"> |
| EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3</td></table> |
| |
| <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="90%"> |
| Chinese</td></table> |
| |
| <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="79%"> |
| BIG5-2003 (experimental)</td></table> |
| |
| <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="90%"> |
| Turkmen</td></table> |
| |
| <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="79%"> |
| TDS565</td></table> |
| |
| <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="90%"> |
| Platform specifics</td></table> |
| |
| <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="79%"> |
| ATARIST, RISCOS-LATIN1</td></table> |
| |
| <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="90%"> |
| The empty encoding name "" is equivalent to |
| "char": it denotes the locale dependent character |
| encoding.</td></table> |
| |
| <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="90%"> |
| 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 |
| similarly looking characters.</td></table> |
| |
| <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="90%"> |
| When the string "//IGNORE" is appended to |
| <i>tocode</i>, characters that cannot be represented in the |
| target character set will be silently |
| discarded.</td></table> |
| |
| <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="90%"> |
| 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>.</td></table> |
| |
| <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="90%"> |
| 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.</td></table> |
| <a name="RETURN VALUE"></a> |
| <h2>RETURN VALUE</h2> |
| |
| <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="90%"> |
| 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).</td></table> |
| <a name="ERRORS"></a> |
| <h2>ERRORS</h2> |
| |
| <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="90%"> |
| The following error can occur, among others:</td></table> |
| |
| <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="90%"> |
| <b>EINVAL</b></td></table> |
| |
| <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="79%"> |
| The conversion from <i>fromcode</i> to <i>tocode</i> is not |
| supported by the implementation.</td></table> |
| <a name="CONFORMING TO"></a> |
| <h2>CONFORMING TO</h2> |
| |
| <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="90%"> |
| UNIX98</td></table> |
| <a name="SEE ALSO"></a> |
| <h2>SEE ALSO</h2> |
| |
| <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="90%"> |
| <b>iconv</b>(3), <b>iconvctl</b>(3), |
| <b>iconv_close</b>(3)</td></table> |
| <hr> |
| </body> |
| </html> |