Annotation of embedaddon/libiconv/man/iconv_open.3.html, revision 1.1.1.3

1.1.1.3 ! misho       1: <!-- Creator     : groff version 1.22.3 -->
1.1.1.2   misho       2: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                      3: "http://www.w3.org/TR/html4/loose.dtd">
1.1       misho       4: <html>
                      5: <head>
                      6: <meta name="generator" content="groff -Thtml, see www.gnu.org">
1.1.1.2   misho       7: <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
1.1       misho       8: <meta name="Content-Style" content="text/css">
1.1.1.2   misho       9: <style type="text/css">
                     10:        p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
                     11:        pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
                     12:        table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
                     13:        h1      { text-align: center }
                     14: </style>
1.1       misho      15: <title>ICONV_OPEN</title>
1.1.1.2   misho      16: 
1.1       misho      17: </head>
                     18: <body>
                     19: 
1.1.1.2   misho      20: <h1 align="center">ICONV_OPEN</h1>
                     21: 
1.1       misho      22: <a href="#NAME">NAME</a><br>
                     23: <a href="#SYNOPSIS">SYNOPSIS</a><br>
                     24: <a href="#DESCRIPTION">DESCRIPTION</a><br>
                     25: <a href="#RETURN VALUE">RETURN VALUE</a><br>
                     26: <a href="#ERRORS">ERRORS</a><br>
                     27: <a href="#CONFORMING TO">CONFORMING TO</a><br>
                     28: <a href="#SEE ALSO">SEE ALSO</a><br>
                     29: 
                     30: <hr>
1.1.1.2   misho      31: 
                     32: 
                     33: <h2>NAME
1.1       misho      34: <a name="NAME"></a>
1.1.1.2   misho      35: </h2>
                     36: 
                     37: 
                     38: <p style="margin-left:11%; margin-top: 1em">iconv_open
                     39: &minus; allocate descriptor for character set conversion</p>
                     40: 
                     41: <h2>SYNOPSIS
1.1       misho      42: <a name="SYNOPSIS"></a>
1.1.1.2   misho      43: </h2>
                     44: 
                     45: 
                     46: <p style="margin-left:11%; margin-top: 1em"><b>#include
                     47: &lt;iconv.h&gt;</b></p>
                     48: 
                     49: <p style="margin-left:11%; margin-top: 1em"><b>iconv_t
                     50: iconv_open (const char*</b> <i>tocode</i><b>, const
                     51: char*</b> <i>fromcode</i><b>);</b></p>
                     52: 
                     53: <h2>DESCRIPTION
1.1       misho      54: <a name="DESCRIPTION"></a>
1.1.1.2   misho      55: </h2>
1.1       misho      56: 
1.1.1.2   misho      57: 
                     58: <p style="margin-left:11%; margin-top: 1em">The
                     59: <b>iconv_open</b> function allocates a conversion descriptor
                     60: suitable for converting byte sequences from character
                     61: encoding <i>fromcode</i> to character encoding
1.1       misho      62: <i>tocode</i>.</p>
1.1.1.2   misho      63: 
                     64: <p style="margin-left:11%; margin-top: 1em">The values
                     65: permitted for <i>fromcode</i> and <i>tocode</i> and the
                     66: supported combinations are system dependent. For the
                     67: libiconv library, the following encodings are supported, in
                     68: all combinations. <br>
                     69: European languages</p>
                     70: 
                     71: <p style="margin-left:22%;">ASCII,
1.1       misho      72: ISO&minus;8859&minus;{1,2,3,4,5,7,9,10,13,14,15,16},
                     73: KOI8&minus;R, KOI8&minus;U, KOI8&minus;RU,
                     74: CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
                     75: Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
                     76: Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
1.1.1.2   misho      77: 
                     78: <p style="margin-left:11%;">Semitic languages</p>
                     79: 
                     80: <p style="margin-left:22%;">ISO&minus;8859&minus;{6,8},
                     81: CP{1255,1256}, CP862, Mac{Hebrew,Arabic}</p>
                     82: 
                     83: <p style="margin-left:11%;">Japanese</p>
                     84: 
                     85: <p style="margin-left:22%;">EUC&minus;JP, SHIFT_JIS, CP932,
                     86: ISO&minus;2022&minus;JP, ISO&minus;2022&minus;JP&minus;2,
1.1.1.3 ! misho      87: ISO&minus;2022&minus;JP&minus;1,
        !            88: ISO-2022&minus;JP&minus;MS</p>
1.1.1.2   misho      89: 
                     90: <p style="margin-left:11%;">Chinese</p>
                     91: 
                     92: <p style="margin-left:22%;">EUC&minus;CN, HZ, GBK, CP936,
                     93: GB18030, EUC&minus;TW, BIG5, CP950, BIG5&minus;HKSCS,
                     94: BIG5&minus;HKSCS:2004, BIG5&minus;HKSCS:2001,
1.1       misho      95: BIG5&minus;HKSCS:1999, ISO&minus;2022&minus;CN,
                     96: ISO&minus;2022&minus;CN&minus;EXT</p>
1.1.1.2   misho      97: 
                     98: <table width="100%" border="0" rules="none" frame="void"
                     99:        cellspacing="0" cellpadding="0">
1.1       misho     100: <tr valign="top" align="left">
                    101: <td width="11%"></td>
1.1.1.2   misho     102: <td width="9%">
1.1       misho     103: 
1.1.1.2   misho     104: 
                    105: <p>Korean</p></td>
                    106: <td width="2%"></td>
                    107: <td width="50%">
                    108: 
                    109: 
                    110: <p>EUC&minus;KR, CP949, ISO&minus;2022&minus;KR, JOHAB</p></td>
                    111: <td width="28%">
                    112: </td></tr>
1.1       misho     113: </table>
1.1.1.2   misho     114: 
                    115: <p style="margin-left:11%;">Armenian</p>
                    116: 
                    117: <p style="margin-left:22%;">ARMSCII&minus;8</p>
                    118: 
                    119: <p style="margin-left:11%;">Georgian</p>
                    120: 
                    121: <p style="margin-left:22%;">Georgian&minus;Academy,
                    122: Georgian&minus;PS</p>
                    123: 
                    124: <table width="100%" border="0" rules="none" frame="void"
                    125:        cellspacing="0" cellpadding="0">
1.1       misho     126: <tr valign="top" align="left">
                    127: <td width="11%"></td>
1.1.1.2   misho     128: <td width="9%">
1.1       misho     129: 
1.1.1.2   misho     130: 
                    131: <p>Tajik</p></td>
                    132: <td width="2%"></td>
                    133: <td width="35%">
                    134: 
                    135: 
                    136: <p>KOI8&minus;T</p></td>
                    137: <td width="43%">
                    138: </td></tr>
1.1       misho     139: <tr valign="top" align="left">
                    140: <td width="11%"></td>
1.1.1.2   misho     141: <td width="9%">
1.1       misho     142: 
1.1.1.2   misho     143: 
                    144: <p>Kazakh</p></td>
                    145: <td width="2%"></td>
                    146: <td width="35%">
                    147: 
                    148: 
                    149: <p>PT154, RK1048</p></td>
                    150: <td width="43%">
                    151: </td></tr>
1.1       misho     152: <tr valign="top" align="left">
                    153: <td width="11%"></td>
1.1.1.2   misho     154: <td width="9%">
1.1       misho     155: 
1.1.1.2   misho     156: 
                    157: <p>Thai</p></td>
                    158: <td width="2%"></td>
                    159: <td width="35%">
                    160: 
                    161: 
                    162: <p>TIS&minus;620, CP874, MacThai</p></td>
                    163: <td width="43%">
                    164: </td></tr>
1.1       misho     165: </table>
1.1.1.2   misho     166: 
                    167: <p style="margin-left:11%;">Laotian</p>
                    168: 
                    169: <p style="margin-left:22%;">MuleLao&minus;1, CP1133</p>
                    170: 
                    171: <p style="margin-left:11%;">Vietnamese</p>
                    172: 
                    173: <p style="margin-left:22%;">VISCII, TCVN, CP1258</p>
                    174: 
                    175: <p style="margin-left:11%;">Platform specifics</p>
                    176: 
                    177: <p style="margin-left:22%;">HP&minus;ROMAN8, NEXTSTEP</p>
                    178: 
                    179: <p style="margin-left:11%;">Full Unicode</p>
                    180: 
                    181: <p style="margin-left:22%;">UTF&minus;8 <br>
                    182: UCS&minus;2, UCS&minus;2BE, UCS&minus;2LE <br>
                    183: UCS&minus;4, UCS&minus;4BE, UCS&minus;4LE <br>
                    184: UTF&minus;16, UTF&minus;16BE, UTF&minus;16LE <br>
                    185: UTF&minus;32, UTF&minus;32BE, UTF&minus;32LE <br>
                    186: UTF&minus;7 <br>
                    187: C99, JAVA</p>
                    188: 
                    189: <p style="margin-left:11%;">Full Unicode, in terms of
                    190: <b>uint16_t</b> or <b>uint32_t</b></p>
                    191: 
                    192: <p style="margin-left:22%;">(with machine dependent
                    193: endianness and alignment) <br>
                    194: UCS&minus;2&minus;INTERNAL, UCS&minus;4&minus;INTERNAL</p>
                    195: 
                    196: <p style="margin-left:11%;">Locale dependent, in terms of
                    197: <b>char</b> or <b>wchar_t</b></p>
                    198: 
                    199: <p style="margin-left:22%;">(with machine dependent
                    200: endianness and alignment, and with semantics depending on
                    201: the OS and the current LC_CTYPE locale facet) <br>
                    202: char, wchar_t</p>
                    203: 
                    204: <p style="margin-left:11%; margin-top: 1em">When configured
                    205: with the option
1.1       misho     206: <b>&minus;&minus;enable&minus;extra&minus;encodings</b>, it
1.1.1.2   misho     207: also provides support for a few extra encodings: <br>
                    208: European languages</p>
1.1       misho     209: 
1.1.1.2   misho     210: 
                    211: <p style="margin-left:22%;">CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}</p>
                    212: 
                    213: <p style="margin-left:11%;">Semitic languages</p>
                    214: 
                    215: <p style="margin-left:22%;">CP864</p>
                    216: 
                    217: <p style="margin-left:11%;">Japanese</p>
                    218: 
                    219: <p style="margin-left:22%;">EUC&minus;JISX0213,
                    220: Shift_JISX0213, ISO&minus;2022&minus;JP&minus;3</p>
                    221: 
                    222: <p style="margin-left:11%;">Chinese</p>
                    223: 
                    224: <p style="margin-left:22%;">BIG5&minus;2003
                    225: (experimental)</p>
                    226: 
                    227: <p style="margin-left:11%;">Turkmen</p>
                    228: 
                    229: <p style="margin-left:22%;">TDS565</p>
                    230: 
                    231: <p style="margin-left:11%;">Platform specifics</p>
                    232: 
                    233: <p style="margin-left:22%;">ATARIST,
                    234: RISCOS&minus;LATIN1</p>
                    235: 
                    236: <p style="margin-left:11%; margin-top: 1em">The empty
                    237: encoding name &quot;&quot; is equivalent to
1.1       misho     238: &quot;char&quot;: it denotes the locale dependent character
                    239: encoding.</p>
1.1.1.2   misho     240: 
                    241: <p style="margin-left:11%; margin-top: 1em">When the string
                    242: &quot;//TRANSLIT&quot; is appended to <i>tocode</i>,
                    243: transliteration is activated. This means that when a
                    244: character cannot be represented in the target character set,
                    245: it can be approximated through one or several characters
                    246: that look similar to the original character.</p>
                    247: 
                    248: <p style="margin-left:11%; margin-top: 1em">When the string
                    249: &quot;//IGNORE&quot; is appended to <i>tocode</i>,
                    250: characters that cannot be represented in the target
                    251: character set will be silently discarded.</p>
                    252: 
                    253: <p style="margin-left:11%; margin-top: 1em">The resulting
                    254: conversion descriptor can be used with <b>iconv</b> any
                    255: number of times. It remains valid until deallocated using
                    256: <b>iconv_close</b>.</p>
                    257: 
                    258: <p style="margin-left:11%; margin-top: 1em">A conversion
                    259: descriptor contains a conversion state. After creation using
                    260: <b>iconv_open</b>, the state is in the initial state. Using
                    261: <b>iconv</b> modifies the descriptor&rsquo;s conversion
                    262: state. (This implies that a conversion descriptor can not be
                    263: used in multiple threads simultaneously.) To bring the state
                    264: back to the initial state, use <b>iconv</b> with NULL as
                    265: <i>inbuf</i> argument.</p>
                    266: 
                    267: <h2>RETURN VALUE
1.1       misho     268: <a name="RETURN VALUE"></a>
1.1.1.2   misho     269: </h2>
                    270: 
                    271: 
                    272: <p style="margin-left:11%; margin-top: 1em">The
                    273: <b>iconv_open</b> function returns a freshly allocated
                    274: conversion descriptor. In case of error, it sets
1.1       misho     275: <b>errno</b> and returns (iconv_t)(&minus;1).</p>
1.1.1.2   misho     276: 
                    277: <h2>ERRORS
1.1       misho     278: <a name="ERRORS"></a>
1.1.1.2   misho     279: </h2>
                    280: 
                    281: 
                    282: <p style="margin-left:11%; margin-top: 1em">The following
                    283: error can occur, among others:</p>
                    284: 
                    285: <table width="100%" border="0" rules="none" frame="void"
                    286:        cellspacing="0" cellpadding="0">
1.1       misho     287: <tr valign="top" align="left">
                    288: <td width="11%"></td>
1.1.1.2   misho     289: <td width="9%">
                    290: 
                    291: 
                    292: <p><b>EINVAL</b></p></td>
                    293: <td width="2%"></td>
                    294: <td width="78%">
1.1       misho     295: 
                    296: 
                    297: <p>The conversion from <i>fromcode</i> to <i>tocode</i> is
1.1.1.2   misho     298: not supported by the implementation.</p></td></tr>
1.1       misho     299: </table>
1.1.1.2   misho     300: 
                    301: <h2>CONFORMING TO
1.1       misho     302: <a name="CONFORMING TO"></a>
1.1.1.2   misho     303: </h2>
                    304: 
                    305: 
                    306: <p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
                    307: 
                    308: <h2>SEE ALSO
1.1       misho     309: <a name="SEE ALSO"></a>
1.1.1.2   misho     310: </h2>
                    311: 
                    312: 
                    313: 
                    314: <p style="margin-left:11%; margin-top: 1em"><b>iconv</b>(3)
                    315: <b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
1.1       misho     316: <hr>
                    317: </body>
                    318: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>