Annotation of embedaddon/libiconv/man/iconv_open.3.html, revision 1.1.1.1
1.1 misho 1: <!-- Creator : groff version 1.18.1 -->
2: <!-- CreationDate: Tue Jun 30 22:52:08 2009 -->
3: <html>
4: <head>
5: <meta name="generator" content="groff -Thtml, see www.gnu.org">
6: <meta name="Content-Style" content="text/css">
7: <title>ICONV_OPEN</title>
8: </head>
9: <body>
10:
11: <h1 align=center>ICONV_OPEN</h1>
12: <a href="#NAME">NAME</a><br>
13: <a href="#SYNOPSIS">SYNOPSIS</a><br>
14: <a href="#DESCRIPTION">DESCRIPTION</a><br>
15: <a href="#RETURN VALUE">RETURN VALUE</a><br>
16: <a href="#ERRORS">ERRORS</a><br>
17: <a href="#CONFORMING TO">CONFORMING TO</a><br>
18: <a href="#SEE ALSO">SEE ALSO</a><br>
19:
20: <hr>
21: <a name="NAME"></a>
22: <h2>NAME</h2>
23: <!-- INDENTATION -->
24: <table width="100%" border=0 rules="none" frame="void"
25: cols="2" cellspacing="0" cellpadding="0">
26: <tr valign="top" align="left">
27: <td width="10%"></td>
28: <td width="89%">
29: <p>iconv_open − allocate descriptor for character set
30: conversion</p>
31: </td>
32: </table>
33: <a name="SYNOPSIS"></a>
34: <h2>SYNOPSIS</h2>
35: <!-- INDENTATION -->
36: <table width="100%" border=0 rules="none" frame="void"
37: cols="2" cellspacing="0" cellpadding="0">
38: <tr valign="top" align="left">
39: <td width="10%"></td>
40: <td width="89%">
41: <pre><b>#include <iconv.h>
42:
43: iconv_t iconv_open (const char*</b> <i>tocode</i><b>, const char*</b> <i>fromcode</i><b>);
44: </b></pre>
45: </td>
46: </table>
47: <a name="DESCRIPTION"></a>
48: <h2>DESCRIPTION</h2>
49: <!-- INDENTATION -->
50:
51: <table width="100%" border=0 rules="none" frame="void"
52: cols="2" cellspacing="0" cellpadding="0">
53: <tr valign="top" align="left">
54: <td width="10%"></td>
55: <td width="89%">
56: <p>The <b>iconv_open</b> function allocates a conversion
57: descriptor suitable for converting byte sequences from
58: character encoding <i>fromcode</i> to character encoding
59: <i>tocode</i>.</p>
60: <!-- INDENTATION -->
61: <p>The values permitted for <i>fromcode</i> and
62: <i>tocode</i> and the supported combinations are system
63: dependent. For the libiconv library, the following encodings
64: are supported, in all combinations.</p>
65: </td>
66: </table>
67: <!-- INDENTATION -->
68: <table width="100%" border=0 rules="none" frame="void"
69: cols="2" cellspacing="0" cellpadding="0">
70: <tr valign="top" align="left">
71: <td width="10%"></td>
72: <td width="89%">
73: <p>European languages</p></td>
74: </table>
75: <!-- INDENTATION -->
76: <table width="100%" border=0 rules="none" frame="void"
77: cols="2" cellspacing="0" cellpadding="0">
78: <tr valign="top" align="left">
79: <td width="21%"></td>
80: <td width="77%">
81: <p>ASCII,
82: ISO−8859−{1,2,3,4,5,7,9,10,13,14,15,16},
83: KOI8−R, KOI8−U, KOI8−RU,
84: CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
85: Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
86: Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
87: </td>
88: </table>
89: <!-- INDENTATION -->
90: <table width="100%" border=0 rules="none" frame="void"
91: cols="2" cellspacing="0" cellpadding="0">
92: <tr valign="top" align="left">
93: <td width="10%"></td>
94: <td width="89%">
95: <p>Semitic languages</p></td>
96: </table>
97: <!-- INDENTATION -->
98: <table width="100%" border=0 rules="none" frame="void"
99: cols="2" cellspacing="0" cellpadding="0">
100: <tr valign="top" align="left">
101: <td width="21%"></td>
102: <td width="77%">
103: <p>ISO−8859−{6,8}, CP{1255,1256}, CP862,
104: Mac{Hebrew,Arabic}</p>
105: </td>
106: </table>
107: <!-- INDENTATION -->
108: <table width="100%" border=0 rules="none" frame="void"
109: cols="2" cellspacing="0" cellpadding="0">
110: <tr valign="top" align="left">
111: <td width="10%"></td>
112: <td width="89%">
113: <p>Japanese</p></td>
114: </table>
115: <!-- INDENTATION -->
116: <table width="100%" border=0 rules="none" frame="void"
117: cols="2" cellspacing="0" cellpadding="0">
118: <tr valign="top" align="left">
119: <td width="21%"></td>
120: <td width="77%">
121: <p>EUC−JP, SHIFT_JIS, CP932, ISO−2022−JP,
122: ISO−2022−JP−2,
123: ISO−2022−JP−1</p>
124: </td>
125: </table>
126: <!-- INDENTATION -->
127: <table width="100%" border=0 rules="none" frame="void"
128: cols="2" cellspacing="0" cellpadding="0">
129: <tr valign="top" align="left">
130: <td width="10%"></td>
131: <td width="89%">
132: <p>Chinese</p></td>
133: </table>
134: <!-- INDENTATION -->
135: <table width="100%" border=0 rules="none" frame="void"
136: cols="2" cellspacing="0" cellpadding="0">
137: <tr valign="top" align="left">
138: <td width="21%"></td>
139: <td width="77%">
140: <p>EUC−CN, HZ, GBK, CP936, GB18030, EUC−TW,
141: BIG5, CP950, BIG5−HKSCS, BIG5−HKSCS:2001,
142: BIG5−HKSCS:1999, ISO−2022−CN,
143: ISO−2022−CN−EXT</p>
144: </td>
145: </table>
146: <!-- TABS -->
147: <table width="100%" border=0 rules="none" frame="void"
148: cols="3" cellspacing="0" cellpadding="0">
149: <tr valign="top" align="left">
150: <td width="11%"></td>
151: <td width="8%">
152:
153: <p>Korean</p>
154: </td>
155: <td width="79%">
156: </td>
157: </table>
158: <!-- INDENTATION -->
159: <table width="100%" border=0 rules="none" frame="void"
160: cols="2" cellspacing="0" cellpadding="0">
161: <tr valign="top" align="left">
162: <td width="21%"></td>
163: <td width="77%">
164: <p>EUC−KR, CP949, ISO−2022−KR, JOHAB</p>
165: </td>
166: </table>
167: <!-- INDENTATION -->
168: <table width="100%" border=0 rules="none" frame="void"
169: cols="2" cellspacing="0" cellpadding="0">
170: <tr valign="top" align="left">
171: <td width="10%"></td>
172: <td width="89%">
173: <p>Armenian</p></td>
174: </table>
175: <!-- INDENTATION -->
176: <table width="100%" border=0 rules="none" frame="void"
177: cols="2" cellspacing="0" cellpadding="0">
178: <tr valign="top" align="left">
179: <td width="21%"></td>
180: <td width="77%">
181: <p>ARMSCII−8</p>
182: </td>
183: </table>
184: <!-- INDENTATION -->
185: <table width="100%" border=0 rules="none" frame="void"
186: cols="2" cellspacing="0" cellpadding="0">
187: <tr valign="top" align="left">
188: <td width="10%"></td>
189: <td width="89%">
190: <p>Georgian</p></td>
191: </table>
192: <!-- INDENTATION -->
193: <table width="100%" border=0 rules="none" frame="void"
194: cols="2" cellspacing="0" cellpadding="0">
195: <tr valign="top" align="left">
196: <td width="21%"></td>
197: <td width="77%">
198: <p>Georgian−Academy, Georgian−PS</p>
199: </td>
200: </table>
201: <!-- TABS -->
202: <table width="100%" border=0 rules="none" frame="void"
203: cols="3" cellspacing="0" cellpadding="0">
204: <tr valign="top" align="left">
205: <td width="11%"></td>
206: <td width="7%">
207:
208: <p>Tajik</p>
209: </td>
210: <td width="80%">
211: </td>
212: </table>
213: <!-- INDENTATION -->
214: <table width="100%" border=0 rules="none" frame="void"
215: cols="2" cellspacing="0" cellpadding="0">
216: <tr valign="top" align="left">
217: <td width="21%"></td>
218: <td width="77%">
219: <p>KOI8−T</p>
220: </td>
221: </table>
222: <!-- TABS -->
223: <table width="100%" border=0 rules="none" frame="void"
224: cols="3" cellspacing="0" cellpadding="0">
225: <tr valign="top" align="left">
226: <td width="11%"></td>
227: <td width="8%">
228:
229: <p>Kazakh</p>
230: </td>
231: <td width="79%">
232: </td>
233: </table>
234: <!-- INDENTATION -->
235: <table width="100%" border=0 rules="none" frame="void"
236: cols="2" cellspacing="0" cellpadding="0">
237: <tr valign="top" align="left">
238: <td width="21%"></td>
239: <td width="77%">
240: <p>PT154, RK1048</p>
241: </td>
242: </table>
243: <!-- TABS -->
244: <table width="100%" border=0 rules="none" frame="void"
245: cols="3" cellspacing="0" cellpadding="0">
246: <tr valign="top" align="left">
247: <td width="11%"></td>
248: <td width="5%">
249:
250: <p>Thai</p>
251: </td>
252: <td width="82%">
253: </td>
254: </table>
255: <!-- INDENTATION -->
256: <table width="100%" border=0 rules="none" frame="void"
257: cols="2" cellspacing="0" cellpadding="0">
258: <tr valign="top" align="left">
259: <td width="21%"></td>
260: <td width="77%">
261: <p>TIS−620, CP874, MacThai</p>
262: </td>
263: </table>
264: <!-- INDENTATION -->
265: <table width="100%" border=0 rules="none" frame="void"
266: cols="2" cellspacing="0" cellpadding="0">
267: <tr valign="top" align="left">
268: <td width="10%"></td>
269: <td width="89%">
270: <p>Laotian</p></td>
271: </table>
272: <!-- INDENTATION -->
273: <table width="100%" border=0 rules="none" frame="void"
274: cols="2" cellspacing="0" cellpadding="0">
275: <tr valign="top" align="left">
276: <td width="21%"></td>
277: <td width="77%">
278: <p>MuleLao−1, CP1133</p>
279: </td>
280: </table>
281: <!-- INDENTATION -->
282: <table width="100%" border=0 rules="none" frame="void"
283: cols="2" cellspacing="0" cellpadding="0">
284: <tr valign="top" align="left">
285: <td width="10%"></td>
286: <td width="89%">
287: <p>Vietnamese</p></td>
288: </table>
289: <!-- INDENTATION -->
290: <table width="100%" border=0 rules="none" frame="void"
291: cols="2" cellspacing="0" cellpadding="0">
292: <tr valign="top" align="left">
293: <td width="21%"></td>
294: <td width="77%">
295: <p>VISCII, TCVN, CP1258</p>
296: </td>
297: </table>
298: <!-- INDENTATION -->
299: <table width="100%" border=0 rules="none" frame="void"
300: cols="2" cellspacing="0" cellpadding="0">
301: <tr valign="top" align="left">
302: <td width="10%"></td>
303: <td width="89%">
304: <p>Platform specifics</p></td>
305: </table>
306: <!-- INDENTATION -->
307: <table width="100%" border=0 rules="none" frame="void"
308: cols="2" cellspacing="0" cellpadding="0">
309: <tr valign="top" align="left">
310: <td width="21%"></td>
311: <td width="77%">
312: <p>HP−ROMAN8, NEXTSTEP</p>
313: </td>
314: </table>
315: <!-- INDENTATION -->
316: <table width="100%" border=0 rules="none" frame="void"
317: cols="2" cellspacing="0" cellpadding="0">
318: <tr valign="top" align="left">
319: <td width="10%"></td>
320: <td width="89%">
321: <p>Full Unicode</p></td>
322: </table>
323: <!-- INDENTATION -->
324: <table width="100%" border=0 rules="none" frame="void"
325: cols="2" cellspacing="0" cellpadding="0">
326: <tr valign="top" align="left">
327: <td width="21%"></td>
328: <td width="77%">
329: <p>UTF−8</p>
330: <!-- INDENTATION -->
331: <p>UCS−2, UCS−2BE, UCS−2LE</p>
332: <!-- INDENTATION -->
333: <p>UCS−4, UCS−4BE, UCS−4LE</p>
334: <!-- INDENTATION -->
335: <p>UTF−16, UTF−16BE, UTF−16LE</p>
336: <!-- INDENTATION -->
337: <p>UTF−32, UTF−32BE, UTF−32LE</p>
338: <!-- INDENTATION -->
339: <p>UTF−7</p>
340: <!-- INDENTATION -->
341: <p>C99, JAVA</p>
342: </td>
343: </table>
344: <!-- INDENTATION -->
345: <table width="100%" border=0 rules="none" frame="void"
346: cols="2" cellspacing="0" cellpadding="0">
347: <tr valign="top" align="left">
348: <td width="10%"></td>
349: <td width="89%">
350: <p>Full Unicode, in terms of <b>uint16_t</b> or
351: <b>uint32_t</b></p></td>
352: </table>
353: <!-- INDENTATION -->
354: <table width="100%" border=0 rules="none" frame="void"
355: cols="2" cellspacing="0" cellpadding="0">
356: <tr valign="top" align="left">
357: <td width="21%"></td>
358: <td width="77%">
359: <p>(with machine dependent endianness and alignment)</p>
360: <!-- INDENTATION -->
361: <p>UCS−2−INTERNAL,
362: UCS−4−INTERNAL</p>
363: </td>
364: </table>
365: <!-- INDENTATION -->
366: <table width="100%" border=0 rules="none" frame="void"
367: cols="2" cellspacing="0" cellpadding="0">
368: <tr valign="top" align="left">
369: <td width="10%"></td>
370: <td width="89%">
371: <p>Locale dependent, in terms of <b>char</b> or
372: <b>wchar_t</b></p></td>
373: </table>
374: <!-- INDENTATION -->
375: <table width="100%" border=0 rules="none" frame="void"
376: cols="2" cellspacing="0" cellpadding="0">
377: <tr valign="top" align="left">
378: <td width="21%"></td>
379: <td width="77%">
380: <p>(with machine dependent endianness and alignment, and
381: with semantics depending on the OS and the current LC_CTYPE
382: locale facet)</p>
383: <!-- INDENTATION -->
384: <p>char, wchar_t</p>
385: </td>
386: </table>
387: <!-- INDENTATION -->
388: <table width="100%" border=0 rules="none" frame="void"
389: cols="2" cellspacing="0" cellpadding="0">
390: <tr valign="top" align="left">
391: <td width="10%"></td>
392: <td width="89%">
393: <p>When configured with the option
394: <b>−−enable−extra−encodings</b>, it
395: also provides support for a few extra encodings:</p>
396: </td>
397: </table>
398: <!-- INDENTATION -->
399: <table width="100%" border=0 rules="none" frame="void"
400: cols="2" cellspacing="0" cellpadding="0">
401: <tr valign="top" align="left">
402: <td width="10%"></td>
403: <td width="89%">
404: <p>European languages</p></td>
405: </table>
406: <!-- INDENTATION -->
407: <table width="100%" border=0 rules="none" frame="void"
408: cols="2" cellspacing="0" cellpadding="0">
409: <tr valign="top" align="left">
410: <td width="21%"></td>
411: <td width="77%">
412: <pre>CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
413: </pre>
414: </td>
415: </table>
416: <!-- INDENTATION -->
417:
418: <table width="100%" border=0 rules="none" frame="void"
419: cols="2" cellspacing="0" cellpadding="0">
420: <tr valign="top" align="left">
421: <td width="10%"></td>
422: <td width="89%">
423: <p>Semitic languages</p></td>
424: </table>
425: <!-- INDENTATION -->
426: <table width="100%" border=0 rules="none" frame="void"
427: cols="2" cellspacing="0" cellpadding="0">
428: <tr valign="top" align="left">
429: <td width="21%"></td>
430: <td width="77%">
431: <p>CP864</p>
432: </td>
433: </table>
434: <!-- INDENTATION -->
435: <table width="100%" border=0 rules="none" frame="void"
436: cols="2" cellspacing="0" cellpadding="0">
437: <tr valign="top" align="left">
438: <td width="10%"></td>
439: <td width="89%">
440: <p>Japanese</p></td>
441: </table>
442: <!-- INDENTATION -->
443: <table width="100%" border=0 rules="none" frame="void"
444: cols="2" cellspacing="0" cellpadding="0">
445: <tr valign="top" align="left">
446: <td width="21%"></td>
447: <td width="77%">
448: <p>EUC−JISX0213, Shift_JISX0213,
449: ISO−2022−JP−3</p>
450: </td>
451: </table>
452: <!-- INDENTATION -->
453: <table width="100%" border=0 rules="none" frame="void"
454: cols="2" cellspacing="0" cellpadding="0">
455: <tr valign="top" align="left">
456: <td width="10%"></td>
457: <td width="89%">
458: <p>Chinese</p></td>
459: </table>
460: <!-- INDENTATION -->
461: <table width="100%" border=0 rules="none" frame="void"
462: cols="2" cellspacing="0" cellpadding="0">
463: <tr valign="top" align="left">
464: <td width="21%"></td>
465: <td width="77%">
466: <p>BIG5−2003 (experimental)</p>
467: </td>
468: </table>
469: <!-- INDENTATION -->
470: <table width="100%" border=0 rules="none" frame="void"
471: cols="2" cellspacing="0" cellpadding="0">
472: <tr valign="top" align="left">
473: <td width="10%"></td>
474: <td width="89%">
475: <p>Turkmen</p></td>
476: </table>
477: <!-- INDENTATION -->
478: <table width="100%" border=0 rules="none" frame="void"
479: cols="2" cellspacing="0" cellpadding="0">
480: <tr valign="top" align="left">
481: <td width="21%"></td>
482: <td width="77%">
483: <p>TDS565</p>
484: </td>
485: </table>
486: <!-- INDENTATION -->
487: <table width="100%" border=0 rules="none" frame="void"
488: cols="2" cellspacing="0" cellpadding="0">
489: <tr valign="top" align="left">
490: <td width="10%"></td>
491: <td width="89%">
492: <p>Platform specifics</p></td>
493: </table>
494: <!-- INDENTATION -->
495: <table width="100%" border=0 rules="none" frame="void"
496: cols="2" cellspacing="0" cellpadding="0">
497: <tr valign="top" align="left">
498: <td width="21%"></td>
499: <td width="77%">
500: <p>ATARIST, RISCOS−LATIN1</p>
501: </td>
502: </table>
503: <!-- INDENTATION -->
504: <table width="100%" border=0 rules="none" frame="void"
505: cols="2" cellspacing="0" cellpadding="0">
506: <tr valign="top" align="left">
507: <td width="10%"></td>
508: <td width="89%">
509: <p>The empty encoding name "" is equivalent to
510: "char": it denotes the locale dependent character
511: encoding.</p>
512: <!-- INDENTATION -->
513: <p>When the string "//TRANSLIT" is appended to
514: <i>tocode</i>, transliteration is activated. This means that
515: when a character cannot be represented in the target
516: character set, it can be approximated through one or several
517: characters that look similar to the original character.</p>
518: <!-- INDENTATION -->
519: <p>When the string "//IGNORE" is appended to
520: <i>tocode</i>, characters that cannot be represented in the
521: target character set will be silently discarded.</p>
522: <!-- INDENTATION -->
523: <p>The resulting conversion descriptor can be used with
524: <b>iconv</b> any number of times. It remains valid until
525: deallocated using <b>iconv_close</b>.</p>
526: <!-- INDENTATION -->
527: <p>A conversion descriptor contains a conversion state.
528: After creation using <b>iconv_open</b>, the state is in the
529: initial state. Using <b>iconv</b> modifies the
530: descriptor’s conversion state. (This implies that a
531: conversion descriptor can not be used in multiple threads
532: simultaneously.) To bring the state back to the initial
533: state, use <b>iconv</b> with NULL as <i>inbuf</i>
534: argument.</p>
535: </td>
536: </table>
537: <a name="RETURN VALUE"></a>
538: <h2>RETURN VALUE</h2>
539: <!-- INDENTATION -->
540: <table width="100%" border=0 rules="none" frame="void"
541: cols="2" cellspacing="0" cellpadding="0">
542: <tr valign="top" align="left">
543: <td width="10%"></td>
544: <td width="89%">
545: <p>The <b>iconv_open</b> function returns a freshly
546: allocated conversion descriptor. In case of error, it sets
547: <b>errno</b> and returns (iconv_t)(−1).</p>
548: </td>
549: </table>
550: <a name="ERRORS"></a>
551: <h2>ERRORS</h2>
552: <!-- INDENTATION -->
553: <table width="100%" border=0 rules="none" frame="void"
554: cols="2" cellspacing="0" cellpadding="0">
555: <tr valign="top" align="left">
556: <td width="10%"></td>
557: <td width="89%">
558: <p>The following error can occur, among others:</p>
559: </td>
560: </table>
561: <!-- TABS -->
562: <table width="100%" border=0 rules="none" frame="void"
563: cols="4" cellspacing="0" cellpadding="0">
564: <tr valign="top" align="left">
565: <td width="11%"></td>
566: <td width="8%">
567:
568: <p><b>EINVAL</b></p>
569: </td>
570: <td width="1%"></td>
571: <td width="77%">
572:
573: <p>The conversion from <i>fromcode</i> to <i>tocode</i> is
574: not supported by the implementation.</p>
575: </td>
576: </table>
577: <a name="CONFORMING TO"></a>
578: <h2>CONFORMING TO</h2>
579: <!-- INDENTATION -->
580: <table width="100%" border=0 rules="none" frame="void"
581: cols="2" cellspacing="0" cellpadding="0">
582: <tr valign="top" align="left">
583: <td width="10%"></td>
584: <td width="89%">
585: <p>POSIX:2001</p>
586: </td>
587: </table>
588: <a name="SEE ALSO"></a>
589: <h2>SEE ALSO</h2>
590: <!-- INDENTATION -->
591: <table width="100%" border=0 rules="none" frame="void"
592: cols="2" cellspacing="0" cellpadding="0">
593: <tr valign="top" align="left">
594: <td width="10%"></td>
595: <td width="89%">
596: <p><b>iconv</b>(3) <b>iconvctl</b>(3)
597: <b>iconv_close</b>(3)</p>
598: </td>
599: </table>
600: <hr>
601: </body>
602: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>