source: Daodan/MSYS2/mingw32/share/doc/libiconv/iconv_open.3.html@ 1174

Last change on this file since 1174 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 8.3 KB
Line 
1<!-- Creator : groff version 1.22.3 -->
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
3"http://www.w3.org/TR/html4/loose.dtd">
4<html>
5<head>
6<meta name="generator" content="groff -Thtml, see www.gnu.org">
7<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
8<meta name="Content-Style" content="text/css">
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>
15<title>ICONV_OPEN</title>
16
17</head>
18<body>
19
20<h1 align="center">ICONV_OPEN</h1>
21
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>
31
32
33<h2>NAME
34<a name="NAME"></a>
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
42<a name="SYNOPSIS"></a>
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
50iconv_open (const char*</b> <i>tocode</i><b>, const
51char*</b> <i>fromcode</i><b>);</b></p>
52
53<h2>DESCRIPTION
54<a name="DESCRIPTION"></a>
55</h2>
56
57
58<p style="margin-left:11%; margin-top: 1em">The
59<b>iconv_open</b> function allocates a conversion descriptor
60suitable for converting byte sequences from character
61encoding <i>fromcode</i> to character encoding
62<i>tocode</i>.</p>
63
64<p style="margin-left:11%; margin-top: 1em">The values
65permitted for <i>fromcode</i> and <i>tocode</i> and the
66supported combinations are system dependent. For the
67libiconv library, the following encodings are supported, in
68all combinations. <br>
69European languages</p>
70
71<p style="margin-left:22%;">ASCII,
72ISO&minus;8859&minus;{1,2,3,4,5,7,9,10,13,14,15,16},
73KOI8&minus;R, KOI8&minus;U, KOI8&minus;RU,
74CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
75Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
76Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
77
78<p style="margin-left:11%;">Semitic languages</p>
79
80<p style="margin-left:22%;">ISO&minus;8859&minus;{6,8},
81CP{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,
86ISO&minus;2022&minus;JP, ISO&minus;2022&minus;JP&minus;2,
87ISO&minus;2022&minus;JP&minus;1,
88ISO-2022&minus;JP&minus;MS</p>
89
90<p style="margin-left:11%;">Chinese</p>
91
92<p style="margin-left:22%;">EUC&minus;CN, HZ, GBK, CP936,
93GB18030, EUC&minus;TW, BIG5, CP950, BIG5&minus;HKSCS,
94BIG5&minus;HKSCS:2004, BIG5&minus;HKSCS:2001,
95BIG5&minus;HKSCS:1999, ISO&minus;2022&minus;CN,
96ISO&minus;2022&minus;CN&minus;EXT</p>
97
98<table width="100%" border="0" rules="none" frame="void"
99 cellspacing="0" cellpadding="0">
100<tr valign="top" align="left">
101<td width="11%"></td>
102<td width="9%">
103
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>
113</table>
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,
122Georgian&minus;PS</p>
123
124<table width="100%" border="0" rules="none" frame="void"
125 cellspacing="0" cellpadding="0">
126<tr valign="top" align="left">
127<td width="11%"></td>
128<td width="9%">
129
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>
139<tr valign="top" align="left">
140<td width="11%"></td>
141<td width="9%">
142
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>
152<tr valign="top" align="left">
153<td width="11%"></td>
154<td width="9%">
155
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>
165</table>
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>
182UCS&minus;2, UCS&minus;2BE, UCS&minus;2LE <br>
183UCS&minus;4, UCS&minus;4BE, UCS&minus;4LE <br>
184UTF&minus;16, UTF&minus;16BE, UTF&minus;16LE <br>
185UTF&minus;32, UTF&minus;32BE, UTF&minus;32LE <br>
186UTF&minus;7 <br>
187C99, 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
193endianness and alignment) <br>
194UCS&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
200endianness and alignment, and with semantics depending on
201the OS and the current LC_CTYPE locale facet) <br>
202char, wchar_t</p>
203
204<p style="margin-left:11%; margin-top: 1em">When configured
205with the option
206<b>&minus;&minus;enable&minus;extra&minus;encodings</b>, it
207also provides support for a few extra encodings: <br>
208European languages</p>
209
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,
220Shift_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,
234RISCOS&minus;LATIN1</p>
235
236<p style="margin-left:11%; margin-top: 1em">The empty
237encoding name &quot;&quot; is equivalent to
238&quot;char&quot;: it denotes the locale dependent character
239encoding.</p>
240
241<p style="margin-left:11%; margin-top: 1em">When the string
242&quot;//TRANSLIT&quot; is appended to <i>tocode</i>,
243transliteration is activated. This means that when a
244character cannot be represented in the target character set,
245it can be approximated through one or several characters
246that 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>,
250characters that cannot be represented in the target
251character set will be silently discarded.</p>
252
253<p style="margin-left:11%; margin-top: 1em">The resulting
254conversion descriptor can be used with <b>iconv</b> any
255number 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
259descriptor 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
262state. (This implies that a conversion descriptor can not be
263used in multiple threads simultaneously.) To bring the state
264back to the initial state, use <b>iconv</b> with NULL as
265<i>inbuf</i> argument.</p>
266
267<h2>RETURN VALUE
268<a name="RETURN VALUE"></a>
269</h2>
270
271
272<p style="margin-left:11%; margin-top: 1em">The
273<b>iconv_open</b> function returns a freshly allocated
274conversion descriptor. In case of error, it sets
275<b>errno</b> and returns (iconv_t)(&minus;1).</p>
276
277<h2>ERRORS
278<a name="ERRORS"></a>
279</h2>
280
281
282<p style="margin-left:11%; margin-top: 1em">The following
283error can occur, among others:</p>
284
285<table width="100%" border="0" rules="none" frame="void"
286 cellspacing="0" cellpadding="0">
287<tr valign="top" align="left">
288<td width="11%"></td>
289<td width="9%">
290
291
292<p><b>EINVAL</b></p></td>
293<td width="2%"></td>
294<td width="78%">
295
296
297<p>The conversion from <i>fromcode</i> to <i>tocode</i> is
298not supported by the implementation.</p></td></tr>
299</table>
300
301<h2>CONFORMING TO
302<a name="CONFORMING TO"></a>
303</h2>
304
305
306<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
307
308<h2>SEE ALSO
309<a name="SEE ALSO"></a>
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>
316<hr>
317</body>
318</html>
Note: See TracBrowser for help on using the repository browser.