version 4, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
ICONV_OPEN |
|
|
2 |
!!!ICONV_OPEN |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
ERRORS |
|
|
8 |
CONFORMING TO |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
iconv_open - allocate descriptor for character set conversion |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__#include |
|
|
19 |
__ ''tocode''__, const char*__ ''fromcode''__); |
|
|
20 |
__ |
|
|
21 |
!!DESCRIPTION |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
The __iconv_open__ function allocates a conversion |
|
|
25 |
descriptor suitable for converting byte sequences from |
|
|
26 |
character encoding ''fromcode'' to character encoding |
|
|
27 |
''tocode''. |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
The values permitted for ''fromcode'' and ''tocode'' |
|
|
31 |
and the supported combinations are system dependent. For the |
|
|
32 |
GNU C library, the permitted values are listed by the |
|
|
33 |
__iconv --list__ command, and all combinations of the |
|
|
34 |
listed values are supported. |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
The resulting conversion descriptor can be used with |
|
|
38 |
__iconv__ any number of times. It remains valid until |
|
|
39 |
deallocated using __iconv_close__. |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
A conversion descriptor contains a conversion state. After |
|
|
43 |
creation using __iconv_open__, the state is in the |
|
|
44 |
initial state. Using __iconv__ modifies the descriptor's |
|
|
45 |
conversion state. (This implies that a conversion descriptor |
|
|
46 |
can not be used in multiple threads simultaneously.) To |
|
|
47 |
bring the state back to the initial state, use __iconv__ |
|
|
48 |
with NULL as ''inbuf'' argument. |
|
|
49 |
!!RETURN VALUE |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
The __iconv_open__ function returns a freshly allocated |
|
|
53 |
conversion descriptor. In case of error, it sets |
|
|
54 |
__errno__ and returns (iconv_t)(-1). |
|
|
55 |
!!ERRORS |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
The following error can occur, among others: |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__EINVAL__ |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
The conversion from ''fromcode'' to ''tocode'' is not |
|
|
65 |
supported by the implementation. |
|
|
66 |
!!CONFORMING TO |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
UNIX98 |
|
|
70 |
!!SEE ALSO |
|
|
71 |
|
|
|
72 |
|
4 |
perry |
73 |
iconv(3), iconv_close(3), |
1 |
perry |
74 |
iconv(1) |
|
|
75 |
---- |