@cpp.js/package-iconv 1.0.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cppjs.config.js +12 -16
- package/package.json +9 -11
- package/charset.xcframework/Info.plist +0 -50
- package/charset.xcframework/ios-arm64_arm64e/Headers/iconv.h +0 -243
- package/charset.xcframework/ios-arm64_arm64e/Headers/libcharset.h +0 -45
- package/charset.xcframework/ios-arm64_arm64e/Headers/localcharset.h +0 -137
- package/charset.xcframework/ios-arm64_arm64e/libcharset.a +0 -0
- package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +0 -243
- package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -45
- package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -137
- package/charset.xcframework/ios-arm64_arm64e_x86_64-simulator/libcharset.a +0 -0
- package/dist/prebuilt/Android-arm64-v8a/include/iconv.h +0 -243
- package/dist/prebuilt/Android-arm64-v8a/include/libcharset.h +0 -45
- package/dist/prebuilt/Android-arm64-v8a/include/localcharset.h +0 -137
- package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.la +0 -41
- package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.so +0 -0
- package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.la +0 -41
- package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.so +0 -0
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.1.html +0 -217
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.3.html +0 -255
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_close.3.html +0 -89
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open.3.html +0 -352
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open_into.3.html +0 -132
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconvctl.3.html +0 -244
- package/dist/prebuilt/Android-arm64-v8a/share/man/man1/iconv.1 +0 -112
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv.3 +0 -129
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_close.3 +0 -31
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open.3 +0 -260
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open_into.3 +0 -47
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconvctl.3 +0 -112
- package/dist/prebuilt/Android-x86_64/include/iconv.h +0 -243
- package/dist/prebuilt/Android-x86_64/include/libcharset.h +0 -45
- package/dist/prebuilt/Android-x86_64/include/localcharset.h +0 -137
- package/dist/prebuilt/Android-x86_64/lib/libcharset.la +0 -41
- package/dist/prebuilt/Android-x86_64/lib/libcharset.so +0 -0
- package/dist/prebuilt/Android-x86_64/lib/libiconv.la +0 -41
- package/dist/prebuilt/Android-x86_64/lib/libiconv.so +0 -0
- package/dist/prebuilt/Android-x86_64/share/doc/iconv.1.html +0 -217
- package/dist/prebuilt/Android-x86_64/share/doc/iconv.3.html +0 -255
- package/dist/prebuilt/Android-x86_64/share/doc/iconv_close.3.html +0 -89
- package/dist/prebuilt/Android-x86_64/share/doc/iconv_open.3.html +0 -352
- package/dist/prebuilt/Android-x86_64/share/doc/iconv_open_into.3.html +0 -132
- package/dist/prebuilt/Android-x86_64/share/doc/iconvctl.3.html +0 -244
- package/dist/prebuilt/Android-x86_64/share/man/man1/iconv.1 +0 -112
- package/dist/prebuilt/Android-x86_64/share/man/man3/iconv.3 +0 -129
- package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_close.3 +0 -31
- package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_open.3 +0 -260
- package/dist/prebuilt/Android-x86_64/share/man/man3/iconv_open_into.3 +0 -47
- package/dist/prebuilt/Android-x86_64/share/man/man3/iconvctl.3 +0 -112
- package/dist/prebuilt/CMakeLists.txt +0 -44
- package/dist/prebuilt/Emscripten-x86_64/include/iconv.h +0 -243
- package/dist/prebuilt/Emscripten-x86_64/include/libcharset.h +0 -45
- package/dist/prebuilt/Emscripten-x86_64/include/localcharset.h +0 -137
- package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.a +0 -0
- package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.la +0 -41
- package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.a +0 -0
- package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.la +0 -41
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.1.html +0 -217
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.3.html +0 -255
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_close.3.html +0 -89
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open.3.html +0 -352
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open_into.3.html +0 -132
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconvctl.3.html +0 -244
- package/dist/prebuilt/Emscripten-x86_64/share/locale/af/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/be/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/bg/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ca/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/cs/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/da/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/de/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/el/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/eo/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/es/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/et/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/fi/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/fr/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ga/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/gl/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/hr/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/hu/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/id/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/it/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ja/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ka/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ko/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/lt/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/nl/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/pl/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/pt_BR/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/rm/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ro/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/ru/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/sk/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/sl/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/sq/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/sr/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/sv/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/tr/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/uk/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/vi/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/wa/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_CN/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/locale/zh_TW/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/man/man1/iconv.1 +0 -112
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv.3 +0 -129
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_close.3 +0 -31
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open.3 +0 -260
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open_into.3 +0 -47
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconvctl.3 +0 -112
- package/dist/prebuilt/iOS-iphoneos/include/iconv.h +0 -243
- package/dist/prebuilt/iOS-iphoneos/include/libcharset.h +0 -45
- package/dist/prebuilt/iOS-iphoneos/include/localcharset.h +0 -137
- package/dist/prebuilt/iOS-iphoneos/lib/libcharset.a +0 -0
- package/dist/prebuilt/iOS-iphoneos/lib/libcharset.la +0 -41
- package/dist/prebuilt/iOS-iphoneos/lib/libiconv.a +0 -0
- package/dist/prebuilt/iOS-iphoneos/lib/libiconv.la +0 -41
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.1.html +0 -217
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.3.html +0 -255
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_close.3.html +0 -89
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open.3.html +0 -352
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open_into.3.html +0 -132
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconvctl.3.html +0 -244
- package/dist/prebuilt/iOS-iphoneos/share/man/man1/iconv.1 +0 -112
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv.3 +0 -129
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_close.3 +0 -31
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open.3 +0 -260
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open_into.3 +0 -47
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconvctl.3 +0 -112
- package/dist/prebuilt/iOS-iphonesimulator/include/iconv.h +0 -243
- package/dist/prebuilt/iOS-iphonesimulator/include/libcharset.h +0 -45
- package/dist/prebuilt/iOS-iphonesimulator/include/localcharset.h +0 -137
- package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.la +0 -41
- package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.la +0 -41
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.1.html +0 -217
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.3.html +0 -255
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_close.3.html +0 -89
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open.3.html +0 -352
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open_into.3.html +0 -132
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconvctl.3.html +0 -244
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man1/iconv.1 +0 -112
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv.3 +0 -129
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_close.3 +0 -31
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open.3 +0 -260
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open_into.3 +0 -47
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconvctl.3 +0 -112
- package/iconv.xcframework/Info.plist +0 -50
- package/iconv.xcframework/ios-arm64_arm64e/Headers/iconv.h +0 -243
- package/iconv.xcframework/ios-arm64_arm64e/Headers/libcharset.h +0 -45
- package/iconv.xcframework/ios-arm64_arm64e/Headers/localcharset.h +0 -137
- package/iconv.xcframework/ios-arm64_arm64e/libiconv.a +0 -0
- package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +0 -243
- package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -45
- package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -137
- package/iconv.xcframework/ios-arm64_arm64e_x86_64-simulator/libiconv.a +0 -0
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
.\" Copyright (c) Free Software Foundation, Inc.
|
|
2
|
-
.\"
|
|
3
|
-
.\" This is free documentation; you can redistribute it and/or
|
|
4
|
-
.\" modify it under the terms of the GNU General Public License as
|
|
5
|
-
.\" published by the Free Software Foundation; either version 3 of
|
|
6
|
-
.\" the License, or (at your option) any later version.
|
|
7
|
-
.\"
|
|
8
|
-
.\" References consulted:
|
|
9
|
-
.\" GNU glibc-2 source code and manual
|
|
10
|
-
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
|
|
11
|
-
.\"
|
|
12
|
-
.TH ICONV_OPEN 3 "December 15, 2024" "GNU"
|
|
13
|
-
.SH NAME
|
|
14
|
-
iconv_open \- allocate descriptor for character set conversion
|
|
15
|
-
.SH SYNOPSIS
|
|
16
|
-
.nf
|
|
17
|
-
.B #include <iconv.h>
|
|
18
|
-
.sp
|
|
19
|
-
.BI "iconv_t iconv_open (const char* " tocode ", const char* " fromcode );
|
|
20
|
-
.fi
|
|
21
|
-
.SH DESCRIPTION
|
|
22
|
-
The \fBiconv_open\fP function allocates a conversion descriptor suitable
|
|
23
|
-
for converting byte sequences from character encoding \fIfromcode\fP to
|
|
24
|
-
character encoding \fItocode\fP.
|
|
25
|
-
.PP
|
|
26
|
-
The values permitted for \fIfromcode\fP and \fItocode\fP and the supported
|
|
27
|
-
combinations are system dependent. For the libiconv library, the following
|
|
28
|
-
encodings are supported, in all combinations.
|
|
29
|
-
.TP
|
|
30
|
-
European languages
|
|
31
|
-
.nf
|
|
32
|
-
.fi
|
|
33
|
-
ASCII, ISO\-8859\-{1,2,3,4,5,7,9,10,13,14,15,16},
|
|
34
|
-
KOI8\-R, KOI8\-U, KOI8\-RU,
|
|
35
|
-
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
|
|
36
|
-
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
|
|
37
|
-
Mac{Cyrillic,Ukraine,Greek,Turkish},
|
|
38
|
-
Macintosh
|
|
39
|
-
.TP
|
|
40
|
-
Semitic languages
|
|
41
|
-
.nf
|
|
42
|
-
.fi
|
|
43
|
-
ISO\-8859\-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
|
|
44
|
-
.TP
|
|
45
|
-
Japanese
|
|
46
|
-
.nf
|
|
47
|
-
.fi
|
|
48
|
-
EUC\-JP, SHIFT_JIS, CP932, ISO\-2022\-JP, ISO\-2022\-JP\-2, ISO\-2022\-JP\-1,
|
|
49
|
-
ISO-2022\-JP\-MS
|
|
50
|
-
.TP
|
|
51
|
-
Chinese
|
|
52
|
-
.nf
|
|
53
|
-
.fi
|
|
54
|
-
EUC\-CN, HZ, GBK, CP936, GB18030, GB18030:2022, EUC\-TW, BIG5, CP950,
|
|
55
|
-
BIG5\-HKSCS, BIG5\-HKSCS:2004, BIG5\-HKSCS:2001, BIG5\-HKSCS:1999,
|
|
56
|
-
ISO\-2022\-CN, ISO\-2022\-CN\-EXT
|
|
57
|
-
.TP
|
|
58
|
-
Korean
|
|
59
|
-
.nf
|
|
60
|
-
.fi
|
|
61
|
-
EUC\-KR, CP949, ISO\-2022\-KR, JOHAB
|
|
62
|
-
.TP
|
|
63
|
-
Armenian
|
|
64
|
-
.nf
|
|
65
|
-
.fi
|
|
66
|
-
ARMSCII\-8
|
|
67
|
-
.TP
|
|
68
|
-
Georgian
|
|
69
|
-
.nf
|
|
70
|
-
.fi
|
|
71
|
-
Georgian\-Academy, Georgian\-PS
|
|
72
|
-
.TP
|
|
73
|
-
Tajik
|
|
74
|
-
.nf
|
|
75
|
-
.fi
|
|
76
|
-
KOI8\-T
|
|
77
|
-
.TP
|
|
78
|
-
Kazakh
|
|
79
|
-
.nf
|
|
80
|
-
.fi
|
|
81
|
-
PT154, RK1048
|
|
82
|
-
.TP
|
|
83
|
-
Thai
|
|
84
|
-
.nf
|
|
85
|
-
.fi
|
|
86
|
-
TIS\-620, CP874, MacThai
|
|
87
|
-
.TP
|
|
88
|
-
Laotian
|
|
89
|
-
.nf
|
|
90
|
-
.fi
|
|
91
|
-
MuleLao\-1, CP1133
|
|
92
|
-
.TP
|
|
93
|
-
Vietnamese
|
|
94
|
-
.nf
|
|
95
|
-
.fi
|
|
96
|
-
VISCII, TCVN, CP1258
|
|
97
|
-
.TP
|
|
98
|
-
Platform specifics
|
|
99
|
-
.nf
|
|
100
|
-
.fi
|
|
101
|
-
HP\-ROMAN8, NEXTSTEP
|
|
102
|
-
.TP
|
|
103
|
-
Full Unicode
|
|
104
|
-
.nf
|
|
105
|
-
.fi
|
|
106
|
-
UTF\-8
|
|
107
|
-
.nf
|
|
108
|
-
.fi
|
|
109
|
-
UCS\-2, UCS\-2BE, UCS\-2LE
|
|
110
|
-
.nf
|
|
111
|
-
.fi
|
|
112
|
-
UCS\-4, UCS\-4BE, UCS\-4LE
|
|
113
|
-
.nf
|
|
114
|
-
.fi
|
|
115
|
-
UTF\-16, UTF\-16BE, UTF\-16LE
|
|
116
|
-
.nf
|
|
117
|
-
.fi
|
|
118
|
-
UTF\-32, UTF\-32BE, UTF\-32LE
|
|
119
|
-
.nf
|
|
120
|
-
.fi
|
|
121
|
-
UTF\-7
|
|
122
|
-
.nf
|
|
123
|
-
.fi
|
|
124
|
-
C99, JAVA
|
|
125
|
-
.TP
|
|
126
|
-
Full Unicode, in terms of \fBuint16_t\fP or \fBuint32_t\fP
|
|
127
|
-
(with machine dependent endianness and alignment)
|
|
128
|
-
.nf
|
|
129
|
-
.fi
|
|
130
|
-
UCS\-2\-INTERNAL, UCS\-4\-INTERNAL
|
|
131
|
-
.TP
|
|
132
|
-
Locale dependent, in terms of \fBchar\fP or \fBwchar_t\fP
|
|
133
|
-
(with machine dependent endianness and alignment, and with semantics
|
|
134
|
-
depending on the OS and the current LC_CTYPE locale facet)
|
|
135
|
-
.nf
|
|
136
|
-
.fi
|
|
137
|
-
char, wchar_t
|
|
138
|
-
.PP
|
|
139
|
-
When configured with the option \fB\-\-enable\-extra\-encodings\fP, it also
|
|
140
|
-
provides support for a few extra encodings:
|
|
141
|
-
.TP
|
|
142
|
-
European languages
|
|
143
|
-
.nf
|
|
144
|
-
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
|
|
145
|
-
.fi
|
|
146
|
-
.TP
|
|
147
|
-
Semitic languages
|
|
148
|
-
.nf
|
|
149
|
-
.fi
|
|
150
|
-
CP864
|
|
151
|
-
.TP
|
|
152
|
-
Japanese
|
|
153
|
-
.nf
|
|
154
|
-
.fi
|
|
155
|
-
EUC\-JISX0213, Shift_JISX0213, ISO\-2022\-JP\-3
|
|
156
|
-
.TP
|
|
157
|
-
Chinese
|
|
158
|
-
.nf
|
|
159
|
-
.fi
|
|
160
|
-
BIG5\-2003 (experimental)
|
|
161
|
-
.TP
|
|
162
|
-
Turkmen
|
|
163
|
-
.nf
|
|
164
|
-
.fi
|
|
165
|
-
TDS565
|
|
166
|
-
.TP
|
|
167
|
-
Platform specifics
|
|
168
|
-
.nf
|
|
169
|
-
.fi
|
|
170
|
-
ATARIST, RISCOS\-LATIN1
|
|
171
|
-
.PP
|
|
172
|
-
.TP
|
|
173
|
-
EBCDIC compatible (not ASCII compatible, very rarely used)
|
|
174
|
-
.nf
|
|
175
|
-
.fi
|
|
176
|
-
European languages:
|
|
177
|
-
.nf
|
|
178
|
-
.fi
|
|
179
|
-
IBM-{037,273,277,278,280,282,284,285,297,423,500,870,871,875,880},
|
|
180
|
-
IBM-{905,924,1025,1026,1047,1112,1122,1123,1140,1141,1142,1143},
|
|
181
|
-
IBM-{1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157,1158},
|
|
182
|
-
IBM-{1165,1166,4971}
|
|
183
|
-
.nf
|
|
184
|
-
.fi
|
|
185
|
-
Semitic languages:
|
|
186
|
-
.nf
|
|
187
|
-
.fi
|
|
188
|
-
IBM-{424,425,12712,16804}
|
|
189
|
-
.nf
|
|
190
|
-
.fi
|
|
191
|
-
Persian:
|
|
192
|
-
.nf
|
|
193
|
-
.fi
|
|
194
|
-
IBM-1097
|
|
195
|
-
.nf
|
|
196
|
-
.fi
|
|
197
|
-
Thai:
|
|
198
|
-
.nf
|
|
199
|
-
.fi
|
|
200
|
-
IBM-{838,1160}
|
|
201
|
-
.nf
|
|
202
|
-
.fi
|
|
203
|
-
Laotian:
|
|
204
|
-
.nf
|
|
205
|
-
.fi
|
|
206
|
-
IBM-1132
|
|
207
|
-
.nf
|
|
208
|
-
.fi
|
|
209
|
-
Vietnamese:
|
|
210
|
-
.nf
|
|
211
|
-
.fi
|
|
212
|
-
IBM-{1130,1164}
|
|
213
|
-
.nf
|
|
214
|
-
.fi
|
|
215
|
-
Indic languages:
|
|
216
|
-
.nf
|
|
217
|
-
.fi
|
|
218
|
-
IBM-1137
|
|
219
|
-
.PP
|
|
220
|
-
The empty encoding name "" is equivalent to "char": it denotes the
|
|
221
|
-
locale dependent character encoding.
|
|
222
|
-
.PP
|
|
223
|
-
When the string "//TRANSLIT" is appended to \fItocode\fP, transliteration
|
|
224
|
-
is activated. This means that when a character cannot be represented in the
|
|
225
|
-
target character set, it can be approximated through one or several characters
|
|
226
|
-
that look similar to the original character.
|
|
227
|
-
.PP
|
|
228
|
-
When the string "//IGNORE" is appended to \fItocode\fP,
|
|
229
|
-
invalid multibyte sequences in the input and
|
|
230
|
-
characters that cannot be represented in the target character set
|
|
231
|
-
will be silently discarded.
|
|
232
|
-
.PP
|
|
233
|
-
When the string "//NON_IDENTICAL_DISCARD" is appended to \fItocode\fP,
|
|
234
|
-
characters that cannot be represented in the target character set
|
|
235
|
-
will be silently discarded.
|
|
236
|
-
.PP
|
|
237
|
-
The resulting conversion descriptor can be used with \fBiconv\fP any number
|
|
238
|
-
of times. It remains valid until deallocated using \fBiconv_close\fP.
|
|
239
|
-
.PP
|
|
240
|
-
A conversion descriptor contains a conversion state. After creation using
|
|
241
|
-
\fBiconv_open\fP, the state is in the initial state. Using \fBiconv\fP
|
|
242
|
-
modifies the descriptor's conversion state. (This implies that a conversion
|
|
243
|
-
descriptor can not be used in multiple threads simultaneously.) To bring the
|
|
244
|
-
state back to the initial state, use \fBiconv\fP with NULL as \fIinbuf\fP
|
|
245
|
-
argument.
|
|
246
|
-
.SH "RETURN VALUE"
|
|
247
|
-
The \fBiconv_open\fP function returns a freshly allocated conversion
|
|
248
|
-
descriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(\-1).
|
|
249
|
-
.SH ERRORS
|
|
250
|
-
The following error can occur, among others:
|
|
251
|
-
.TP
|
|
252
|
-
.B EINVAL
|
|
253
|
-
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
|
|
254
|
-
implementation.
|
|
255
|
-
.SH "CONFORMING TO"
|
|
256
|
-
POSIX:2024
|
|
257
|
-
.SH "SEE ALSO"
|
|
258
|
-
.BR iconv (3)
|
|
259
|
-
.BR iconvctl (3)
|
|
260
|
-
.BR iconv_close (3)
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.\" Copyright (c) Free Software Foundation, Inc.
|
|
2
|
-
.\"
|
|
3
|
-
.\" This is free documentation; you can redistribute it and/or
|
|
4
|
-
.\" modify it under the terms of the GNU General Public License as
|
|
5
|
-
.\" published by the Free Software Foundation; either version 3 of
|
|
6
|
-
.\" the License, or (at your option) any later version.
|
|
7
|
-
.\"
|
|
8
|
-
.\" References consulted:
|
|
9
|
-
.\" iconv.h
|
|
10
|
-
.\"
|
|
11
|
-
.TH ICONV_OPEN_INTO 3 "September 21, 2008" "GNU"
|
|
12
|
-
.SH NAME
|
|
13
|
-
iconv_open_into \- initialize descriptor for character set conversion
|
|
14
|
-
.SH SYNOPSIS
|
|
15
|
-
.nf
|
|
16
|
-
.B #include <iconv.h>
|
|
17
|
-
.sp
|
|
18
|
-
.BI "int iconv_open_into (const char* " tocode ", const char* " fromcode ","
|
|
19
|
-
.BI " iconv_allocation_t* " resultp );
|
|
20
|
-
.fi
|
|
21
|
-
.SH DESCRIPTION
|
|
22
|
-
The \fBiconv_open_into\fP function initializes a conversion descriptor suitable
|
|
23
|
-
for converting byte sequences from character encoding \fIfromcode\fP to
|
|
24
|
-
character encoding \fItocode\fP. The conversion descriptor is stored in the
|
|
25
|
-
memory pointed to by \fIresultp\fP.
|
|
26
|
-
.PP
|
|
27
|
-
The values permitted for \fIfromcode\fP and \fItocode\fP are the same as for
|
|
28
|
-
the function \fBiconv_open\fP.
|
|
29
|
-
.PP
|
|
30
|
-
After a successful return from this function, \fIresultp\fP can be be used
|
|
31
|
-
as an \fBiconv_t\fP object with the \fBiconv\fP function.
|
|
32
|
-
.SH "RETURN VALUE"
|
|
33
|
-
The \fBiconv_open_into\fP function fills \fB*\fP\fIresultp\fP and returns 0 if
|
|
34
|
-
it succeeds. In case of error, it sets \fBerrno\fP and returns \-1.
|
|
35
|
-
.SH ERRORS
|
|
36
|
-
The following error can occur, among others:
|
|
37
|
-
.TP
|
|
38
|
-
.B EINVAL
|
|
39
|
-
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
|
|
40
|
-
implementation.
|
|
41
|
-
.SH "CONFORMING TO"
|
|
42
|
-
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
|
|
43
|
-
implementations. It is not backed by a standard. You can test for its presence
|
|
44
|
-
through \fB(_LIBICONV_VERSION >= 0x010D)\fP.
|
|
45
|
-
.SH "SEE ALSO"
|
|
46
|
-
.BR iconv_open (3)
|
|
47
|
-
.BR iconv (3)
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
.\" Copyright (c) Perry Rapp
|
|
2
|
-
.\" Copyright (c) Free Software Foundation, Inc.
|
|
3
|
-
.\"
|
|
4
|
-
.\" This is free documentation; you can redistribute it and/or
|
|
5
|
-
.\" modify it under the terms of the GNU General Public License as
|
|
6
|
-
.\" published by the Free Software Foundation; either version 3 of
|
|
7
|
-
.\" the License, or (at your option) any later version.
|
|
8
|
-
.\"
|
|
9
|
-
.\" References consulted:
|
|
10
|
-
.\" iconv.h
|
|
11
|
-
.\"
|
|
12
|
-
.TH ICONVCTL 3 "December 15, 2024" "GNU"
|
|
13
|
-
.SH NAME
|
|
14
|
-
iconvctl \- control iconv behavior
|
|
15
|
-
.SH SYNOPSIS
|
|
16
|
-
.nf
|
|
17
|
-
.B #include <iconv.h>
|
|
18
|
-
.sp
|
|
19
|
-
.BI "int iconvctl (iconv_t " cd " , int " request ", void * " argument );
|
|
20
|
-
.fi
|
|
21
|
-
.SH DESCRIPTION
|
|
22
|
-
The argument \fIcd\fP must be a conversion descriptor created using the
|
|
23
|
-
function \fBiconv_open\fP.
|
|
24
|
-
.PP
|
|
25
|
-
\fBiconvctl\fP queries or adjusts the behavior of the \fBiconv\fP function,
|
|
26
|
-
when invoked with the specified conversion descriptor, depending on the
|
|
27
|
-
request value.
|
|
28
|
-
.SH "REQUEST VALUES"
|
|
29
|
-
The following are permissible values for the \fIrequest\fP parameter.
|
|
30
|
-
.TP
|
|
31
|
-
.B ICONV_TRIVIALP
|
|
32
|
-
\fIargument\fP should be an \fBint *\fP which will receive 1 if the
|
|
33
|
-
conversion is trivial, or 0 otherwise.
|
|
34
|
-
.TP
|
|
35
|
-
.B ICONV_GET_TRANSLITERATE
|
|
36
|
-
\fIargument\fP should be an \fBint *\fP which will receive 1 if
|
|
37
|
-
transliteration is enabled in the conversion, or 0 otherwise.
|
|
38
|
-
.TP
|
|
39
|
-
.B ICONV_SET_TRANSLITERATE
|
|
40
|
-
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
|
41
|
-
A non-zero value is used to enable transliteration in the conversion. A zero
|
|
42
|
-
value disables it.
|
|
43
|
-
.TP
|
|
44
|
-
.B ICONV_GET_DISCARD_INVALID
|
|
45
|
-
\fIargument\fP should be an \fBint *\fP which will receive 1 if "discard
|
|
46
|
-
invalid multibyte sequence from the input and continue"
|
|
47
|
-
is enabled in the conversion, or 0 otherwise.
|
|
48
|
-
.TP
|
|
49
|
-
.B ICONV_SET_DISCARD_INVALID
|
|
50
|
-
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
|
51
|
-
A non-zero value is used to enable "discard
|
|
52
|
-
invalid multibyte sequence from the input and continue"
|
|
53
|
-
in the conversion. A zero value disables it.
|
|
54
|
-
.TP
|
|
55
|
-
.B ICONV_GET_DISCARD_NON_IDENTICAL
|
|
56
|
-
\fIargument\fP should be an \fBint *\fP which will receive 1 if "discard
|
|
57
|
-
character that cannot be represented in the target character set and continue"
|
|
58
|
-
is enabled in the conversion, or 0 otherwise.
|
|
59
|
-
.TP
|
|
60
|
-
.B ICONV_SET_DISCARD_NON_IDENTICAL
|
|
61
|
-
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
|
62
|
-
A non-zero value is used to enable "discard
|
|
63
|
-
character that cannot be represented in the target character set and continue"
|
|
64
|
-
in the conversion. A zero value disables it.
|
|
65
|
-
.TP
|
|
66
|
-
.B ICONV_GET_DISCARD_ILSEQ
|
|
67
|
-
\fIargument\fP should be an \fBint *\fP which will receive 1 if both "discard"
|
|
68
|
-
behaviours are enabled in the conversion, or 0 otherwise.
|
|
69
|
-
.TP
|
|
70
|
-
.B ICONV_SET_DISCARD_ILSEQ
|
|
71
|
-
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
|
|
72
|
-
A non-zero value is used to enable both "discard" behaviours in the conversion.
|
|
73
|
-
A zero value disables them.
|
|
74
|
-
.TP
|
|
75
|
-
.B ICONV_GET_FROM_SURFACE
|
|
76
|
-
\fIargument\fP should be an \fBunsigned int *\fP which will receive the
|
|
77
|
-
from-side (input side) surface of the conversion.
|
|
78
|
-
.TP
|
|
79
|
-
.B ICONV_SET_FROM_SURFACE
|
|
80
|
-
\fIargument\fP should be a \fBconst unsigned int *\fP, pointing to an
|
|
81
|
-
\fBunsigned int\fP value. This value is installed as the from-side
|
|
82
|
-
(input side) surface of the conversion. The value is a bit mask. Zero
|
|
83
|
-
denotes no surface. The value \fBICONV_SURFACE_EBCDIC_ZOS_UNIX\fP has
|
|
84
|
-
an effect on EBCDIC encodings: The EBCDIC newline 0x15 will get mapped
|
|
85
|
-
to LF instead of NEL.
|
|
86
|
-
.TP
|
|
87
|
-
.B ICONV_GET_TO_SURFACE
|
|
88
|
-
\fIargument\fP should be an \fBunsigned int *\fP which will receive the
|
|
89
|
-
to-side (output side) surface of the conversion.
|
|
90
|
-
.TP
|
|
91
|
-
.B ICONV_SET_TO_SURFACE
|
|
92
|
-
\fIargument\fP should be a \fBconst unsigned int *\fP, pointing to an
|
|
93
|
-
\fBunsigned int\fP value. This value is installed as the to-side
|
|
94
|
-
(output side) surface of the conversion. The value is a bit mask. Zero
|
|
95
|
-
denotes no surface. The value \fBICONV_SURFACE_EBCDIC_ZOS_UNIX\fP has
|
|
96
|
-
an effect on EBCDIC encodings: LF, instead of NEL, will get mapped to
|
|
97
|
-
the EBCDIC newline 0x15.
|
|
98
|
-
.SH "RETURN VALUE"
|
|
99
|
-
The \fBiconvctl\fP function returns 0 if it succeeds. In case of error, it sets
|
|
100
|
-
\fBerrno\fP and returns \-1.
|
|
101
|
-
.SH ERRORS
|
|
102
|
-
The following errors can occur, among others:
|
|
103
|
-
.TP
|
|
104
|
-
.B EINVAL
|
|
105
|
-
The request is invalid.
|
|
106
|
-
.SH "CONFORMING TO"
|
|
107
|
-
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
|
|
108
|
-
implementations. It is not backed by a standard. You can test for its presence
|
|
109
|
-
through \fB(_LIBICONV_VERSION >= 0x0108)\fP.
|
|
110
|
-
.SH "SEE ALSO"
|
|
111
|
-
.BR iconv_open (3)
|
|
112
|
-
.BR iconv (3)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.28)
|
|
2
|
-
set(CMAKE_CXX_STANDARD 11)
|
|
3
|
-
set(PROJECT_NAME "iconv")
|
|
4
|
-
set(PROJECT_LIBS "iconv;charset")
|
|
5
|
-
project("${PROJECT_NAME}")
|
|
6
|
-
|
|
7
|
-
if(ANDROID)
|
|
8
|
-
set(PACKAGE_HOST "${CMAKE_SYSTEM_NAME}-${CMAKE_ANDROID_ARCH_ABI}")
|
|
9
|
-
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PACKAGE_HOST}/lib")
|
|
10
|
-
elseif(APPLE)
|
|
11
|
-
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
12
|
-
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/../..")
|
|
13
|
-
else()
|
|
14
|
-
set(PACKAGE_HOST "${CMAKE_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
|
15
|
-
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PACKAGE_HOST}/lib")
|
|
16
|
-
endif()
|
|
17
|
-
elseif(UNIX)
|
|
18
|
-
set(PACKAGE_HOST "${CMAKE_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
|
19
|
-
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PACKAGE_HOST}/lib")
|
|
20
|
-
else()
|
|
21
|
-
set(PACKAGE_HOST "${CMAKE_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
|
22
|
-
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PACKAGE_HOST}/lib")
|
|
23
|
-
endif()
|
|
24
|
-
|
|
25
|
-
set(PROJECT_LIBS_DIR)
|
|
26
|
-
foreach(L IN LISTS PROJECT_LIBS)
|
|
27
|
-
SET(FOUND_LIB "FOUND_LIB-NOTFOUND")
|
|
28
|
-
find_library(FOUND_LIB
|
|
29
|
-
NAMES "${L}"
|
|
30
|
-
PATHS "${PACKAGE_DIR}"
|
|
31
|
-
NO_CACHE
|
|
32
|
-
NO_DEFAULT_PATH
|
|
33
|
-
NO_CMAKE_FIND_ROOT_PATH
|
|
34
|
-
REQUIRED
|
|
35
|
-
)
|
|
36
|
-
LIST(APPEND PROJECT_LIBS_DIR ${FOUND_LIB})
|
|
37
|
-
endforeach()
|
|
38
|
-
|
|
39
|
-
add_library("${PROJECT_NAME}" INTERFACE)
|
|
40
|
-
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
41
|
-
|
|
42
|
-
if(NOT APPLE)
|
|
43
|
-
target_include_directories("${PROJECT_NAME}" INTERFACE "${PROJECT_SOURCE_DIR}/${PACKAGE_HOST}/include")
|
|
44
|
-
endif()
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
|
|
2
|
-
This file is part of the GNU LIBICONV Library.
|
|
3
|
-
|
|
4
|
-
The GNU LIBICONV Library is free software; you can redistribute it
|
|
5
|
-
and/or modify it under the terms of the GNU Lesser General Public
|
|
6
|
-
License as published by the Free Software Foundation; either version 2.1
|
|
7
|
-
of the License, or (at your option) any later version.
|
|
8
|
-
|
|
9
|
-
The GNU LIBICONV Library is distributed in the hope that it will be
|
|
10
|
-
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
-
Lesser General Public License for more details.
|
|
13
|
-
|
|
14
|
-
You should have received a copy of the GNU Lesser General Public
|
|
15
|
-
License along with the GNU LIBICONV Library; see the file COPYING.LIB.
|
|
16
|
-
If not, see <https://www.gnu.org/licenses/>. */
|
|
17
|
-
|
|
18
|
-
/* When installed, this file is called "iconv.h". */
|
|
19
|
-
|
|
20
|
-
#ifndef _LIBICONV_H
|
|
21
|
-
#define _LIBICONV_H
|
|
22
|
-
|
|
23
|
-
#ifdef __cplusplus
|
|
24
|
-
extern "C" {
|
|
25
|
-
#endif
|
|
26
|
-
|
|
27
|
-
#define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
|
|
28
|
-
extern int _libiconv_version; /* Likewise */
|
|
29
|
-
|
|
30
|
-
#ifdef __cplusplus
|
|
31
|
-
}
|
|
32
|
-
#endif
|
|
33
|
-
|
|
34
|
-
/* We would like to #include any system header file which could define
|
|
35
|
-
iconv_t, in order to eliminate the risk that the user gets compilation
|
|
36
|
-
errors because some other system header file includes /usr/include/iconv.h
|
|
37
|
-
which defines iconv_t or declares iconv after this file.
|
|
38
|
-
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
|
|
39
|
-
has been installed in /usr/local/include, there is no way any more to
|
|
40
|
-
include the original /usr/include/iconv.h. We simply have to get away
|
|
41
|
-
without it.
|
|
42
|
-
The risk that a system header file does
|
|
43
|
-
#include "iconv.h" or #include_next "iconv.h"
|
|
44
|
-
is small. They all do #include <iconv.h>. */
|
|
45
|
-
|
|
46
|
-
/* Define iconv_t ourselves. */
|
|
47
|
-
#undef iconv_t
|
|
48
|
-
#define iconv_t libiconv_t
|
|
49
|
-
typedef void* iconv_t;
|
|
50
|
-
|
|
51
|
-
/* Get size_t declaration.
|
|
52
|
-
Get wchar_t declaration if it exists. */
|
|
53
|
-
#include <stddef.h>
|
|
54
|
-
|
|
55
|
-
/* Get errno declaration and values. */
|
|
56
|
-
#include <errno.h>
|
|
57
|
-
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
|
|
58
|
-
have EILSEQ in a different header. On these systems, define EILSEQ
|
|
59
|
-
ourselves. */
|
|
60
|
-
#ifndef EILSEQ
|
|
61
|
-
#define EILSEQ
|
|
62
|
-
#endif
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
#ifdef __cplusplus
|
|
66
|
-
extern "C" {
|
|
67
|
-
#endif
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
|
71
|
-
encoding ‘tocode’. */
|
|
72
|
-
#define iconv_open libiconv_open
|
|
73
|
-
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
74
|
-
|
|
75
|
-
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
|
|
76
|
-
starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
|
|
77
|
-
‘*outbuf’.
|
|
78
|
-
Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
|
|
79
|
-
Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
|
|
80
|
-
#define iconv libiconv
|
|
81
|
-
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
|
82
|
-
|
|
83
|
-
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
|
84
|
-
#define iconv_close libiconv_close
|
|
85
|
-
extern int iconv_close (iconv_t cd);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#ifdef __cplusplus
|
|
89
|
-
}
|
|
90
|
-
#endif
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/* Nonstandard extensions. */
|
|
94
|
-
|
|
95
|
-
#if 1
|
|
96
|
-
#if 0
|
|
97
|
-
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
|
98
|
-
<wchar.h>.
|
|
99
|
-
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
|
100
|
-
included before <wchar.h>. */
|
|
101
|
-
#include <stddef.h>
|
|
102
|
-
#include <stdio.h>
|
|
103
|
-
#include <time.h>
|
|
104
|
-
#endif
|
|
105
|
-
#include <wchar.h>
|
|
106
|
-
#endif
|
|
107
|
-
|
|
108
|
-
#ifdef __cplusplus
|
|
109
|
-
extern "C" {
|
|
110
|
-
#endif
|
|
111
|
-
|
|
112
|
-
/* A type that holds all memory needed by a conversion descriptor.
|
|
113
|
-
A pointer to such an object can be used as an iconv_t. */
|
|
114
|
-
typedef struct {
|
|
115
|
-
void* dummy1[28];
|
|
116
|
-
#if 1
|
|
117
|
-
mbstate_t dummy2;
|
|
118
|
-
#endif
|
|
119
|
-
} iconv_allocation_t;
|
|
120
|
-
|
|
121
|
-
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
|
122
|
-
encoding ‘tocode’ into preallocated memory. Returns an error indicator
|
|
123
|
-
(0 or -1 with errno set). */
|
|
124
|
-
#define iconv_open_into libiconv_open_into
|
|
125
|
-
extern int iconv_open_into (const char* tocode, const char* fromcode,
|
|
126
|
-
iconv_allocation_t* resultp);
|
|
127
|
-
|
|
128
|
-
/* Control of attributes. */
|
|
129
|
-
#define iconvctl libiconvctl
|
|
130
|
-
extern int iconvctl (iconv_t cd, int request, void* argument);
|
|
131
|
-
|
|
132
|
-
/* Hook performed after every successful conversion of a Unicode character. */
|
|
133
|
-
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
|
|
134
|
-
/* Hook performed after every successful conversion of a wide character. */
|
|
135
|
-
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
|
|
136
|
-
/* Set of hooks. */
|
|
137
|
-
struct iconv_hooks {
|
|
138
|
-
iconv_unicode_char_hook uc_hook;
|
|
139
|
-
iconv_wide_char_hook wc_hook;
|
|
140
|
-
void* data;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/* Fallback function. Invoked when a small number of bytes could not be
|
|
144
|
-
converted to a Unicode character. This function should process all
|
|
145
|
-
bytes from inbuf and may produce replacement Unicode characters by calling
|
|
146
|
-
the write_replacement callback repeatedly. */
|
|
147
|
-
typedef void (*iconv_unicode_mb_to_uc_fallback)
|
|
148
|
-
(const char* inbuf, size_t inbufsize,
|
|
149
|
-
void (*write_replacement) (const unsigned int *buf, size_t buflen,
|
|
150
|
-
void* callback_arg),
|
|
151
|
-
void* callback_arg,
|
|
152
|
-
void* data);
|
|
153
|
-
/* Fallback function. Invoked when a Unicode character could not be converted
|
|
154
|
-
to the target encoding. This function should process the character and
|
|
155
|
-
may produce replacement bytes (in the target encoding) by calling the
|
|
156
|
-
write_replacement callback repeatedly. */
|
|
157
|
-
typedef void (*iconv_unicode_uc_to_mb_fallback)
|
|
158
|
-
(unsigned int code,
|
|
159
|
-
void (*write_replacement) (const char *buf, size_t buflen,
|
|
160
|
-
void* callback_arg),
|
|
161
|
-
void* callback_arg,
|
|
162
|
-
void* data);
|
|
163
|
-
/* Fallback function. Invoked when a number of bytes could not be converted to
|
|
164
|
-
a wide character. This function should process all bytes from inbuf and may
|
|
165
|
-
produce replacement wide characters by calling the write_replacement
|
|
166
|
-
callback repeatedly. */
|
|
167
|
-
typedef void (*iconv_wchar_mb_to_wc_fallback)
|
|
168
|
-
(const char* inbuf, size_t inbufsize,
|
|
169
|
-
void (*write_replacement) (const wchar_t *buf, size_t buflen,
|
|
170
|
-
void* callback_arg),
|
|
171
|
-
void* callback_arg,
|
|
172
|
-
void* data);
|
|
173
|
-
/* Fallback function. Invoked when a wide character could not be converted to
|
|
174
|
-
the target encoding. This function should process the character and may
|
|
175
|
-
produce replacement bytes (in the target encoding) by calling the
|
|
176
|
-
write_replacement callback repeatedly. */
|
|
177
|
-
typedef void (*iconv_wchar_wc_to_mb_fallback)
|
|
178
|
-
(wchar_t code,
|
|
179
|
-
void (*write_replacement) (const char *buf, size_t buflen,
|
|
180
|
-
void* callback_arg),
|
|
181
|
-
void* callback_arg,
|
|
182
|
-
void* data);
|
|
183
|
-
/* Set of fallbacks. */
|
|
184
|
-
struct iconv_fallbacks {
|
|
185
|
-
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
|
|
186
|
-
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
|
|
187
|
-
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
|
|
188
|
-
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
|
|
189
|
-
void* data;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
/* Surfaces.
|
|
193
|
-
The concept of surfaces is described in the 'recode' manual. */
|
|
194
|
-
#define ICONV_SURFACE_NONE 0
|
|
195
|
-
/* In EBCDIC encodings, 0x15 (which encodes the "newline function", see the
|
|
196
|
-
Unicode standard, chapter 5) maps to U+000A instead of U+0085. This is
|
|
197
|
-
for interoperability with C programs and Unix environments on z/OS. */
|
|
198
|
-
#define ICONV_SURFACE_EBCDIC_ZOS_UNIX 1
|
|
199
|
-
|
|
200
|
-
/* Requests for iconvctl. */
|
|
201
|
-
#define ICONV_TRIVIALP 0 /* int *argument */
|
|
202
|
-
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
|
|
203
|
-
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
|
|
204
|
-
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
|
|
205
|
-
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
|
|
206
|
-
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
|
|
207
|
-
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
|
|
208
|
-
#define ICONV_GET_FROM_SURFACE 7 /* unsigned int *argument */
|
|
209
|
-
#define ICONV_SET_FROM_SURFACE 8 /* const unsigned int *argument */
|
|
210
|
-
#define ICONV_GET_TO_SURFACE 9 /* unsigned int *argument */
|
|
211
|
-
#define ICONV_SET_TO_SURFACE 10 /* const unsigned int *argument */
|
|
212
|
-
#define ICONV_GET_DISCARD_INVALID 11 /* int *argument */
|
|
213
|
-
#define ICONV_SET_DISCARD_INVALID 12 /* const int *argument */
|
|
214
|
-
#define ICONV_GET_DISCARD_NON_IDENTICAL 13 /* int *argument */
|
|
215
|
-
#define ICONV_SET_DISCARD_NON_IDENTICAL 14 /* const int *argument */
|
|
216
|
-
|
|
217
|
-
/* Listing of locale independent encodings. */
|
|
218
|
-
#define iconvlist libiconvlist
|
|
219
|
-
extern void iconvlist (int (*do_one) (unsigned int namescount,
|
|
220
|
-
const char * const * names,
|
|
221
|
-
void* data),
|
|
222
|
-
void* data);
|
|
223
|
-
|
|
224
|
-
/* Canonicalize an encoding name.
|
|
225
|
-
The result is either a canonical encoding name, or name itself. */
|
|
226
|
-
extern const char * iconv_canonicalize (const char * name);
|
|
227
|
-
|
|
228
|
-
/* Support for relocatable packages. */
|
|
229
|
-
|
|
230
|
-
/* Sets the original and the current installation prefix of the package.
|
|
231
|
-
Relocation simply replaces a pathname starting with the original prefix
|
|
232
|
-
by the corresponding pathname with the current prefix instead. Both
|
|
233
|
-
prefixes should be directory names without trailing slash (i.e. use ""
|
|
234
|
-
instead of "/"). */
|
|
235
|
-
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
|
|
236
|
-
const char *curr_prefix);
|
|
237
|
-
|
|
238
|
-
#ifdef __cplusplus
|
|
239
|
-
}
|
|
240
|
-
#endif
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
#endif /* _LIBICONV_H */
|