@cpp.js/package-iconv 1.0.0-beta.20 → 1.0.0-beta.22
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/README.md +3 -0
- package/{dist/prebuilt/charset.xcframework/ios-arm64_arm64e_x86_64-simulator → charset.xcframework/ios-arm64_arm64e}/Headers/iconv.h +37 -35
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e/libcharset.a +0 -0
- package/{dist/prebuilt/charset.xcframework/ios-arm64_arm64e → charset.xcframework/ios-arm64_arm64e_x86_64-simulator}/Headers/iconv.h +37 -35
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e_x86_64-simulator/libcharset.a +0 -0
- package/cppjs-package-iconv.podspec +1 -1
- package/dist/prebuilt/Android-arm64-v8a/include/iconv.h +37 -35
- package/dist/prebuilt/Android-arm64-v8a/lib/libcharset.la +2 -2
- package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.la +5 -5
- package/dist/prebuilt/Android-arm64-v8a/lib/libiconv.so +0 -0
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.1.html +13 -1
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv.3.html +55 -6
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_close.3.html +1 -1
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconv_open.3.html +14 -7
- package/dist/prebuilt/Android-arm64-v8a/share/doc/iconvctl.3.html +80 -6
- package/dist/prebuilt/Android-arm64-v8a/share/man/man1/iconv.1 +6 -2
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv.3 +44 -7
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_close.3 +2 -2
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open.3 +13 -7
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconv_open_into.3 +1 -1
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/iconvctl.3 +51 -6
- package/dist/prebuilt/CMakeLists.txt +1 -1
- package/dist/prebuilt/Emscripten-x86_64/include/iconv.h +37 -35
- package/dist/prebuilt/Emscripten-x86_64/lib/libcharset.la +1 -1
- package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.a +0 -0
- package/dist/prebuilt/Emscripten-x86_64/lib/libiconv.la +4 -4
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.1.html +13 -1
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv.3.html +55 -6
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_close.3.html +1 -1
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconv_open.3.html +14 -7
- package/dist/prebuilt/Emscripten-x86_64/share/doc/iconvctl.3.html +80 -6
- 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/da/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/et/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/it/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/lt/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/sv/LC_MESSAGES/libiconv.mo +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/man/man1/iconv.1 +6 -2
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv.3 +44 -7
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_close.3 +2 -2
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open.3 +13 -7
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconv_open_into.3 +1 -1
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/iconvctl.3 +51 -6
- package/dist/prebuilt/iOS-iphoneos/include/iconv.h +37 -35
- package/dist/prebuilt/iOS-iphoneos/lib/libcharset.a +0 -0
- package/dist/prebuilt/iOS-iphoneos/lib/libcharset.la +1 -1
- package/dist/prebuilt/iOS-iphoneos/lib/libiconv.a +0 -0
- package/dist/prebuilt/iOS-iphoneos/lib/libiconv.la +4 -4
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.1.html +13 -1
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv.3.html +55 -6
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_close.3.html +1 -1
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconv_open.3.html +14 -7
- package/dist/prebuilt/iOS-iphoneos/share/doc/iconvctl.3.html +80 -6
- package/dist/prebuilt/iOS-iphoneos/share/man/man1/iconv.1 +6 -2
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv.3 +44 -7
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_close.3 +2 -2
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open.3 +13 -7
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconv_open_into.3 +1 -1
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/iconvctl.3 +51 -6
- package/dist/prebuilt/iOS-iphonesimulator/include/iconv.h +37 -35
- package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/lib/libcharset.la +1 -1
- package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/lib/libiconv.la +4 -4
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.1.html +13 -1
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv.3.html +55 -6
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_close.3.html +1 -1
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconv_open.3.html +14 -7
- package/dist/prebuilt/iOS-iphonesimulator/share/doc/iconvctl.3.html +80 -6
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man1/iconv.1 +6 -2
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv.3 +44 -7
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_close.3 +2 -2
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open.3 +13 -7
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconv_open_into.3 +1 -1
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/iconvctl.3 +51 -6
- package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e/Headers/iconv.h +37 -35
- package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e/libiconv.a +0 -0
- package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e_x86_64-simulator/Headers/iconv.h +37 -35
- package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e_x86_64-simulator/libiconv.a +0 -0
- package/package.json +4 -5
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/Info.plist +0 -0
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e/Headers/libcharset.h +0 -0
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e/Headers/localcharset.h +0 -0
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -0
- package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -0
- package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/Info.plist +5 -5
- /package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e/Headers/libcharset.h +0 -0
- /package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e/Headers/localcharset.h +0 -0
- /package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e_x86_64-simulator/Headers/libcharset.h +0 -0
- /package/{dist/prebuilt/iconv.xcframework → iconv.xcframework}/ios-arm64_arm64e_x86_64-simulator/Headers/localcharset.h +0 -0
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<a href="https://www.npmjs.com/package/@cpp.js/package-iconv">
|
|
5
5
|
<img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-iconv?style=for-the-badge" />
|
|
6
6
|
</a>
|
|
7
|
+
<a href="https://www.gnu.org/software/libiconv/">
|
|
8
|
+
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Funpkg.com%2F%40cpp.js%2Fpackage-iconv%2Fpackage.json&query=%24.nativeVersion&style=for-the-badge&label=iconv" />
|
|
9
|
+
</a>
|
|
7
10
|
<a href="https://spdx.org/licenses/LGPL-2.1-or-later.html">
|
|
8
11
|
<img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-iconv?style=for-the-badge" />
|
|
9
12
|
</a>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright (C) 1999-
|
|
1
|
+
/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
|
|
2
2
|
This file is part of the GNU LIBICONV Library.
|
|
3
3
|
|
|
4
4
|
The GNU LIBICONV Library is free software; you can redistribute it
|
|
@@ -20,25 +20,28 @@
|
|
|
20
20
|
#ifndef _LIBICONV_H
|
|
21
21
|
#define _LIBICONV_H
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
#ifdef __cplusplus
|
|
24
|
+
extern "C" {
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
|
|
24
28
|
extern int _libiconv_version; /* Likewise */
|
|
25
29
|
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
}
|
|
32
|
+
#endif
|
|
33
|
+
|
|
26
34
|
/* We would like to #include any system header file which could define
|
|
27
|
-
iconv_t,
|
|
35
|
+
iconv_t, in order to eliminate the risk that the user gets compilation
|
|
28
36
|
errors because some other system header file includes /usr/include/iconv.h
|
|
29
|
-
which defines iconv_t or declares iconv after this file
|
|
30
|
-
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
|
|
31
|
-
binary compatible code.
|
|
37
|
+
which defines iconv_t or declares iconv after this file.
|
|
32
38
|
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
|
|
33
39
|
has been installed in /usr/local/include, there is no way any more to
|
|
34
40
|
include the original /usr/include/iconv.h. We simply have to get away
|
|
35
41
|
without it.
|
|
36
|
-
|
|
42
|
+
The risk that a system header file does
|
|
37
43
|
#include "iconv.h" or #include_next "iconv.h"
|
|
38
|
-
is small. They all do #include <iconv.h>.
|
|
39
|
-
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
|
|
40
|
-
has to be a scalar type because (iconv_t)(-1) is a possible return value
|
|
41
|
-
from iconv_open().) */
|
|
44
|
+
is small. They all do #include <iconv.h>. */
|
|
42
45
|
|
|
43
46
|
/* Define iconv_t ourselves. */
|
|
44
47
|
#undef iconv_t
|
|
@@ -66,9 +69,7 @@ extern "C" {
|
|
|
66
69
|
|
|
67
70
|
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
|
68
71
|
encoding ‘tocode’. */
|
|
69
|
-
#ifndef LIBICONV_PLUG
|
|
70
72
|
#define iconv_open libiconv_open
|
|
71
|
-
#endif
|
|
72
73
|
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
73
74
|
|
|
74
75
|
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
|
|
@@ -76,15 +77,11 @@ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
|
76
77
|
‘*outbuf’.
|
|
77
78
|
Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
|
|
78
79
|
Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
|
|
79
|
-
#ifndef LIBICONV_PLUG
|
|
80
80
|
#define iconv libiconv
|
|
81
|
-
#endif
|
|
82
81
|
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
|
83
82
|
|
|
84
83
|
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
|
85
|
-
#ifndef LIBICONV_PLUG
|
|
86
84
|
#define iconv_close libiconv_close
|
|
87
|
-
#endif
|
|
88
85
|
extern int iconv_close (iconv_t cd);
|
|
89
86
|
|
|
90
87
|
|
|
@@ -93,8 +90,6 @@ extern int iconv_close (iconv_t cd);
|
|
|
93
90
|
#endif
|
|
94
91
|
|
|
95
92
|
|
|
96
|
-
#ifndef LIBICONV_PLUG
|
|
97
|
-
|
|
98
93
|
/* Nonstandard extensions. */
|
|
99
94
|
|
|
100
95
|
#if 1
|
|
@@ -165,7 +160,6 @@ typedef void (*iconv_unicode_uc_to_mb_fallback)
|
|
|
165
160
|
void* callback_arg),
|
|
166
161
|
void* callback_arg,
|
|
167
162
|
void* data);
|
|
168
|
-
#if 1
|
|
169
163
|
/* Fallback function. Invoked when a number of bytes could not be converted to
|
|
170
164
|
a wide character. This function should process all bytes from inbuf and may
|
|
171
165
|
produce replacement wide characters by calling the write_replacement
|
|
@@ -186,12 +180,6 @@ typedef void (*iconv_wchar_wc_to_mb_fallback)
|
|
|
186
180
|
void* callback_arg),
|
|
187
181
|
void* callback_arg,
|
|
188
182
|
void* data);
|
|
189
|
-
#else
|
|
190
|
-
/* If the wchar_t type does not exist, these two fallback functions are never
|
|
191
|
-
invoked. Their argument list therefore does not matter. */
|
|
192
|
-
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
|
|
193
|
-
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
|
|
194
|
-
#endif
|
|
195
183
|
/* Set of fallbacks. */
|
|
196
184
|
struct iconv_fallbacks {
|
|
197
185
|
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
|
|
@@ -201,14 +189,30 @@ struct iconv_fallbacks {
|
|
|
201
189
|
void* data;
|
|
202
190
|
};
|
|
203
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
|
+
|
|
204
200
|
/* Requests for iconvctl. */
|
|
205
|
-
#define ICONV_TRIVIALP
|
|
206
|
-
#define ICONV_GET_TRANSLITERATE
|
|
207
|
-
#define ICONV_SET_TRANSLITERATE
|
|
208
|
-
#define ICONV_GET_DISCARD_ILSEQ
|
|
209
|
-
#define ICONV_SET_DISCARD_ILSEQ
|
|
210
|
-
#define ICONV_SET_HOOKS
|
|
211
|
-
#define ICONV_SET_FALLBACKS
|
|
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 */
|
|
212
216
|
|
|
213
217
|
/* Listing of locale independent encodings. */
|
|
214
218
|
#define iconvlist libiconvlist
|
|
@@ -235,7 +239,5 @@ extern void libiconv_set_relocation_prefix (const char *orig_prefix,
|
|
|
235
239
|
}
|
|
236
240
|
#endif
|
|
237
241
|
|
|
238
|
-
#endif
|
|
239
|
-
|
|
240
242
|
|
|
241
243
|
#endif /* _LIBICONV_H */
|
package/{dist/prebuilt/charset.xcframework → charset.xcframework}/ios-arm64_arm64e/libcharset.a
RENAMED
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright (C) 1999-
|
|
1
|
+
/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
|
|
2
2
|
This file is part of the GNU LIBICONV Library.
|
|
3
3
|
|
|
4
4
|
The GNU LIBICONV Library is free software; you can redistribute it
|
|
@@ -20,25 +20,28 @@
|
|
|
20
20
|
#ifndef _LIBICONV_H
|
|
21
21
|
#define _LIBICONV_H
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
#ifdef __cplusplus
|
|
24
|
+
extern "C" {
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
|
|
24
28
|
extern int _libiconv_version; /* Likewise */
|
|
25
29
|
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
}
|
|
32
|
+
#endif
|
|
33
|
+
|
|
26
34
|
/* We would like to #include any system header file which could define
|
|
27
|
-
iconv_t,
|
|
35
|
+
iconv_t, in order to eliminate the risk that the user gets compilation
|
|
28
36
|
errors because some other system header file includes /usr/include/iconv.h
|
|
29
|
-
which defines iconv_t or declares iconv after this file
|
|
30
|
-
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
|
|
31
|
-
binary compatible code.
|
|
37
|
+
which defines iconv_t or declares iconv after this file.
|
|
32
38
|
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
|
|
33
39
|
has been installed in /usr/local/include, there is no way any more to
|
|
34
40
|
include the original /usr/include/iconv.h. We simply have to get away
|
|
35
41
|
without it.
|
|
36
|
-
|
|
42
|
+
The risk that a system header file does
|
|
37
43
|
#include "iconv.h" or #include_next "iconv.h"
|
|
38
|
-
is small. They all do #include <iconv.h>.
|
|
39
|
-
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
|
|
40
|
-
has to be a scalar type because (iconv_t)(-1) is a possible return value
|
|
41
|
-
from iconv_open().) */
|
|
44
|
+
is small. They all do #include <iconv.h>. */
|
|
42
45
|
|
|
43
46
|
/* Define iconv_t ourselves. */
|
|
44
47
|
#undef iconv_t
|
|
@@ -66,9 +69,7 @@ extern "C" {
|
|
|
66
69
|
|
|
67
70
|
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
|
68
71
|
encoding ‘tocode’. */
|
|
69
|
-
#ifndef LIBICONV_PLUG
|
|
70
72
|
#define iconv_open libiconv_open
|
|
71
|
-
#endif
|
|
72
73
|
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
73
74
|
|
|
74
75
|
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
|
|
@@ -76,15 +77,11 @@ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
|
76
77
|
‘*outbuf’.
|
|
77
78
|
Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
|
|
78
79
|
Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
|
|
79
|
-
#ifndef LIBICONV_PLUG
|
|
80
80
|
#define iconv libiconv
|
|
81
|
-
#endif
|
|
82
81
|
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
|
83
82
|
|
|
84
83
|
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
|
85
|
-
#ifndef LIBICONV_PLUG
|
|
86
84
|
#define iconv_close libiconv_close
|
|
87
|
-
#endif
|
|
88
85
|
extern int iconv_close (iconv_t cd);
|
|
89
86
|
|
|
90
87
|
|
|
@@ -93,8 +90,6 @@ extern int iconv_close (iconv_t cd);
|
|
|
93
90
|
#endif
|
|
94
91
|
|
|
95
92
|
|
|
96
|
-
#ifndef LIBICONV_PLUG
|
|
97
|
-
|
|
98
93
|
/* Nonstandard extensions. */
|
|
99
94
|
|
|
100
95
|
#if 1
|
|
@@ -165,7 +160,6 @@ typedef void (*iconv_unicode_uc_to_mb_fallback)
|
|
|
165
160
|
void* callback_arg),
|
|
166
161
|
void* callback_arg,
|
|
167
162
|
void* data);
|
|
168
|
-
#if 1
|
|
169
163
|
/* Fallback function. Invoked when a number of bytes could not be converted to
|
|
170
164
|
a wide character. This function should process all bytes from inbuf and may
|
|
171
165
|
produce replacement wide characters by calling the write_replacement
|
|
@@ -186,12 +180,6 @@ typedef void (*iconv_wchar_wc_to_mb_fallback)
|
|
|
186
180
|
void* callback_arg),
|
|
187
181
|
void* callback_arg,
|
|
188
182
|
void* data);
|
|
189
|
-
#else
|
|
190
|
-
/* If the wchar_t type does not exist, these two fallback functions are never
|
|
191
|
-
invoked. Their argument list therefore does not matter. */
|
|
192
|
-
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
|
|
193
|
-
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
|
|
194
|
-
#endif
|
|
195
183
|
/* Set of fallbacks. */
|
|
196
184
|
struct iconv_fallbacks {
|
|
197
185
|
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
|
|
@@ -201,14 +189,30 @@ struct iconv_fallbacks {
|
|
|
201
189
|
void* data;
|
|
202
190
|
};
|
|
203
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
|
+
|
|
204
200
|
/* Requests for iconvctl. */
|
|
205
|
-
#define ICONV_TRIVIALP
|
|
206
|
-
#define ICONV_GET_TRANSLITERATE
|
|
207
|
-
#define ICONV_SET_TRANSLITERATE
|
|
208
|
-
#define ICONV_GET_DISCARD_ILSEQ
|
|
209
|
-
#define ICONV_SET_DISCARD_ILSEQ
|
|
210
|
-
#define ICONV_SET_HOOKS
|
|
211
|
-
#define ICONV_SET_FALLBACKS
|
|
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 */
|
|
212
216
|
|
|
213
217
|
/* Listing of locale independent encodings. */
|
|
214
218
|
#define iconvlist libiconvlist
|
|
@@ -235,7 +239,5 @@ extern void libiconv_set_relocation_prefix (const char *orig_prefix,
|
|
|
235
239
|
}
|
|
236
240
|
#endif
|
|
237
241
|
|
|
238
|
-
#endif
|
|
239
|
-
|
|
240
242
|
|
|
241
243
|
#endif /* _LIBICONV_H */
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
|
3
3
|
|
|
4
4
|
Pod::Spec.new do |s|
|
|
5
5
|
s.module_name = "iconv"
|
|
6
|
-
s.name = package
|
|
6
|
+
s.name = "cppjs-package-iconv"
|
|
7
7
|
s.version = package["nativeVersion"]
|
|
8
8
|
s.summary = "Iconv can convert from any of these encodings to any other, through Unicode conversion."
|
|
9
9
|
s.homepage = "https://www.gnu.org/software/libiconv/"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright (C) 1999-
|
|
1
|
+
/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
|
|
2
2
|
This file is part of the GNU LIBICONV Library.
|
|
3
3
|
|
|
4
4
|
The GNU LIBICONV Library is free software; you can redistribute it
|
|
@@ -20,25 +20,28 @@
|
|
|
20
20
|
#ifndef _LIBICONV_H
|
|
21
21
|
#define _LIBICONV_H
|
|
22
22
|
|
|
23
|
-
#
|
|
23
|
+
#ifdef __cplusplus
|
|
24
|
+
extern "C" {
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#define _LIBICONV_VERSION 0x0112 /* version number: (major<<8) + minor */
|
|
24
28
|
extern int _libiconv_version; /* Likewise */
|
|
25
29
|
|
|
30
|
+
#ifdef __cplusplus
|
|
31
|
+
}
|
|
32
|
+
#endif
|
|
33
|
+
|
|
26
34
|
/* We would like to #include any system header file which could define
|
|
27
|
-
iconv_t,
|
|
35
|
+
iconv_t, in order to eliminate the risk that the user gets compilation
|
|
28
36
|
errors because some other system header file includes /usr/include/iconv.h
|
|
29
|
-
which defines iconv_t or declares iconv after this file
|
|
30
|
-
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
|
|
31
|
-
binary compatible code.
|
|
37
|
+
which defines iconv_t or declares iconv after this file.
|
|
32
38
|
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
|
|
33
39
|
has been installed in /usr/local/include, there is no way any more to
|
|
34
40
|
include the original /usr/include/iconv.h. We simply have to get away
|
|
35
41
|
without it.
|
|
36
|
-
|
|
42
|
+
The risk that a system header file does
|
|
37
43
|
#include "iconv.h" or #include_next "iconv.h"
|
|
38
|
-
is small. They all do #include <iconv.h>.
|
|
39
|
-
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
|
|
40
|
-
has to be a scalar type because (iconv_t)(-1) is a possible return value
|
|
41
|
-
from iconv_open().) */
|
|
44
|
+
is small. They all do #include <iconv.h>. */
|
|
42
45
|
|
|
43
46
|
/* Define iconv_t ourselves. */
|
|
44
47
|
#undef iconv_t
|
|
@@ -66,9 +69,7 @@ extern "C" {
|
|
|
66
69
|
|
|
67
70
|
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
|
|
68
71
|
encoding ‘tocode’. */
|
|
69
|
-
#ifndef LIBICONV_PLUG
|
|
70
72
|
#define iconv_open libiconv_open
|
|
71
|
-
#endif
|
|
72
73
|
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
73
74
|
|
|
74
75
|
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
|
|
@@ -76,15 +77,11 @@ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
|
|
|
76
77
|
‘*outbuf’.
|
|
77
78
|
Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
|
|
78
79
|
Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
|
|
79
|
-
#ifndef LIBICONV_PLUG
|
|
80
80
|
#define iconv libiconv
|
|
81
|
-
#endif
|
|
82
81
|
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
|
|
83
82
|
|
|
84
83
|
/* Frees resources allocated for conversion descriptor ‘cd’. */
|
|
85
|
-
#ifndef LIBICONV_PLUG
|
|
86
84
|
#define iconv_close libiconv_close
|
|
87
|
-
#endif
|
|
88
85
|
extern int iconv_close (iconv_t cd);
|
|
89
86
|
|
|
90
87
|
|
|
@@ -93,8 +90,6 @@ extern int iconv_close (iconv_t cd);
|
|
|
93
90
|
#endif
|
|
94
91
|
|
|
95
92
|
|
|
96
|
-
#ifndef LIBICONV_PLUG
|
|
97
|
-
|
|
98
93
|
/* Nonstandard extensions. */
|
|
99
94
|
|
|
100
95
|
#if 1
|
|
@@ -165,7 +160,6 @@ typedef void (*iconv_unicode_uc_to_mb_fallback)
|
|
|
165
160
|
void* callback_arg),
|
|
166
161
|
void* callback_arg,
|
|
167
162
|
void* data);
|
|
168
|
-
#if 1
|
|
169
163
|
/* Fallback function. Invoked when a number of bytes could not be converted to
|
|
170
164
|
a wide character. This function should process all bytes from inbuf and may
|
|
171
165
|
produce replacement wide characters by calling the write_replacement
|
|
@@ -186,12 +180,6 @@ typedef void (*iconv_wchar_wc_to_mb_fallback)
|
|
|
186
180
|
void* callback_arg),
|
|
187
181
|
void* callback_arg,
|
|
188
182
|
void* data);
|
|
189
|
-
#else
|
|
190
|
-
/* If the wchar_t type does not exist, these two fallback functions are never
|
|
191
|
-
invoked. Their argument list therefore does not matter. */
|
|
192
|
-
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
|
|
193
|
-
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
|
|
194
|
-
#endif
|
|
195
183
|
/* Set of fallbacks. */
|
|
196
184
|
struct iconv_fallbacks {
|
|
197
185
|
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
|
|
@@ -201,14 +189,30 @@ struct iconv_fallbacks {
|
|
|
201
189
|
void* data;
|
|
202
190
|
};
|
|
203
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
|
+
|
|
204
200
|
/* Requests for iconvctl. */
|
|
205
|
-
#define ICONV_TRIVIALP
|
|
206
|
-
#define ICONV_GET_TRANSLITERATE
|
|
207
|
-
#define ICONV_SET_TRANSLITERATE
|
|
208
|
-
#define ICONV_GET_DISCARD_ILSEQ
|
|
209
|
-
#define ICONV_SET_DISCARD_ILSEQ
|
|
210
|
-
#define ICONV_SET_HOOKS
|
|
211
|
-
#define ICONV_SET_FALLBACKS
|
|
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 */
|
|
212
216
|
|
|
213
217
|
/* Listing of locale independent encodings. */
|
|
214
218
|
#define iconvlist libiconvlist
|
|
@@ -235,7 +239,5 @@ extern void libiconv_set_relocation_prefix (const char *orig_prefix,
|
|
|
235
239
|
}
|
|
236
240
|
#endif
|
|
237
241
|
|
|
238
|
-
#endif
|
|
239
|
-
|
|
240
242
|
|
|
241
243
|
#endif /* _LIBICONV_H */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# libcharset.la - a libtool library file
|
|
2
|
-
# Generated by libtool (GNU libtool) 2.4
|
|
2
|
+
# Generated by libtool (GNU libtool) 2.5.4
|
|
3
3
|
#
|
|
4
4
|
# Please DO NOT delete this file!
|
|
5
5
|
# It is necessary for linking the library.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
dlname='libcharset.so'
|
|
9
9
|
|
|
10
10
|
# Names of this library.
|
|
11
|
-
library_names='libcharset.so'
|
|
11
|
+
library_names='libcharset.so libcharset.so'
|
|
12
12
|
|
|
13
13
|
# The name of the static archive.
|
|
14
14
|
old_library=''
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# libiconv.la - a libtool library file
|
|
2
|
-
# Generated by libtool (GNU libtool) 2.4
|
|
2
|
+
# Generated by libtool (GNU libtool) 2.5.4
|
|
3
3
|
#
|
|
4
4
|
# Please DO NOT delete this file!
|
|
5
5
|
# It is necessary for linking the library.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
dlname='libiconv.so'
|
|
9
9
|
|
|
10
10
|
# Names of this library.
|
|
11
|
-
library_names='libiconv.so'
|
|
11
|
+
library_names='libiconv.so libiconv.so'
|
|
12
12
|
|
|
13
13
|
# The name of the static archive.
|
|
14
14
|
old_library=''
|
|
@@ -23,9 +23,9 @@ dependency_libs=''
|
|
|
23
23
|
weak_library_names=''
|
|
24
24
|
|
|
25
25
|
# Version information for libiconv.
|
|
26
|
-
current=
|
|
27
|
-
age=
|
|
28
|
-
revision=
|
|
26
|
+
current=9
|
|
27
|
+
age=7
|
|
28
|
+
revision=0
|
|
29
29
|
|
|
30
30
|
# Is this an already installed library?
|
|
31
31
|
installed=yes
|
|
Binary file
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<a href="#NAME">NAME</a><br>
|
|
23
23
|
<a href="#SYNOPSIS">SYNOPSIS</a><br>
|
|
24
24
|
<a href="#DESCRIPTION">DESCRIPTION</a><br>
|
|
25
|
+
<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
|
|
25
26
|
<a href="#EXAMPLES">EXAMPLES</a><br>
|
|
26
27
|
<a href="#CONFORMING TO">CONFORMING TO</a><br>
|
|
27
28
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
|
@@ -155,6 +156,17 @@ are printed in upper case, separated by whitespace, and
|
|
|
155
156
|
alias names of an encoding are listed on the same line as
|
|
156
157
|
the encoding itself.</p>
|
|
157
158
|
|
|
159
|
+
<h2>ENVIRONMENT
|
|
160
|
+
<a name="ENVIRONMENT"></a>
|
|
161
|
+
</h2>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<p style="margin-left:11%; margin-top: 1em">Conversion
|
|
165
|
+
from/to EBCDIC encodings can be modified in a specific way:
|
|
166
|
+
If the environment variable <b>ICONV_EBCDIC_ZOS_UNIX</b> is
|
|
167
|
+
set to a non-empty value, the EBCDIC newline 0x15 will get
|
|
168
|
+
mapped to LF instead of NEL.</p>
|
|
169
|
+
|
|
158
170
|
<h2>EXAMPLES
|
|
159
171
|
<a name="EXAMPLES"></a>
|
|
160
172
|
</h2>
|
|
@@ -190,7 +202,7 @@ encodings.</p>
|
|
|
190
202
|
</h2>
|
|
191
203
|
|
|
192
204
|
|
|
193
|
-
<p style="margin-left:11%; margin-top: 1em">POSIX:
|
|
205
|
+
<p style="margin-left:11%; margin-top: 1em">POSIX:2024</p>
|
|
194
206
|
|
|
195
207
|
<h2>SEE ALSO
|
|
196
208
|
<a name="SEE ALSO"></a>
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
<a href="#RETURN VALUE">RETURN VALUE</a><br>
|
|
26
26
|
<a href="#ERRORS">ERRORS</a><br>
|
|
27
27
|
<a href="#CONFORMING TO">CONFORMING TO</a><br>
|
|
28
|
+
<a href="#NOTES">NOTES</a><br>
|
|
28
29
|
<a href="#SEE ALSO">SEE ALSO</a><br>
|
|
29
30
|
|
|
30
31
|
<hr>
|
|
@@ -83,7 +84,7 @@ encoding of the input is stateful, the <b>iconv</b> function
|
|
|
83
84
|
can also convert a sequence of input bytes to an update of
|
|
84
85
|
the conversion state without producing any output bytes;
|
|
85
86
|
such input is called a <i>shift sequence</i>. The conversion
|
|
86
|
-
can stop for
|
|
87
|
+
can stop for five reasons:</p>
|
|
87
88
|
|
|
88
89
|
<p style="margin-left:11%; margin-top: 1em">1. An invalid
|
|
89
90
|
multibyte sequence is encountered in the input. In this case
|
|
@@ -91,20 +92,40 @@ it sets <b>errno</b> to <b>EILSEQ</b> and returns
|
|
|
91
92
|
(size_t)(−1). <i>*inbuf</i> is left pointing to the
|
|
92
93
|
beginning of the invalid multibyte sequence.</p>
|
|
93
94
|
|
|
94
|
-
<p style="margin-left:11%; margin-top: 1em">2.
|
|
95
|
+
<p style="margin-left:11%; margin-top: 1em">2. A multibyte
|
|
96
|
+
sequence is encountered that is valid but that cannot be
|
|
97
|
+
translated to the character encoding of the output. This
|
|
98
|
+
condition depends on the implementation and on the
|
|
99
|
+
conversion descriptor. In the GNU C library and GNU
|
|
100
|
+
libiconv, if <i>cd</i> was created without the suffix
|
|
101
|
+
<b>//TRANSLIT</b> or <b>//IGNORE</b> or
|
|
102
|
+
<b>//NON_IDENTICAL_DISCARD</b>, the conversion is strict:
|
|
103
|
+
lossy conversions produce this condition. If the suffix
|
|
104
|
+
<b>//TRANSLIT</b> was specified, transliteration can avoid
|
|
105
|
+
this condition in some cases. In the musl C library, this
|
|
106
|
+
condition cannot occur because a conversion to <b>'*'</b> is
|
|
107
|
+
used as a fallback. In the FreeBSD, NetBSD, and Solaris
|
|
108
|
+
implementations of <b>iconv</b>, this condition cannot occur
|
|
109
|
+
either, because a conversion to <b>'?'</b> is used as a
|
|
110
|
+
fallback. When this condition is met, the <b>iconv</b>
|
|
111
|
+
function sets <b>errno</b> to <b>EILSEQ</b> and returns
|
|
112
|
+
(size_t)(−1). <i>*inbuf</i> is left pointing to the
|
|
113
|
+
beginning of the unconvertible multibyte sequence.</p>
|
|
114
|
+
|
|
115
|
+
<p style="margin-left:11%; margin-top: 1em">3. The input
|
|
95
116
|
byte sequence has been entirely converted, i.e.
|
|
96
117
|
<i>*inbytesleft</i> has gone down to 0. In this case
|
|
97
118
|
<b>iconv</b> returns the number of non-reversible
|
|
98
119
|
conversions performed during this call.</p>
|
|
99
120
|
|
|
100
|
-
<p style="margin-left:11%; margin-top: 1em">
|
|
121
|
+
<p style="margin-left:11%; margin-top: 1em">4. An
|
|
101
122
|
incomplete multibyte sequence is encountered in the input,
|
|
102
123
|
and the input byte sequence terminates after it. In this
|
|
103
124
|
case it sets <b>errno</b> to <b>EINVAL</b> and returns
|
|
104
125
|
(size_t)(−1). <i>*inbuf</i> is left pointing to the
|
|
105
126
|
beginning of the incomplete multibyte sequence.</p>
|
|
106
127
|
|
|
107
|
-
<p style="margin-left:11%; margin-top: 1em">
|
|
128
|
+
<p style="margin-left:11%; margin-top: 1em">5. The output
|
|
108
129
|
buffer has no more room for the next converted character. In
|
|
109
130
|
this case it sets <b>errno</b> to <b>E2BIG</b> and returns
|
|
110
131
|
(size_t)(−1).</p>
|
|
@@ -191,7 +212,35 @@ the input.</p></td></tr>
|
|
|
191
212
|
</h2>
|
|
192
213
|
|
|
193
214
|
|
|
194
|
-
<p style="margin-left:11%; margin-top: 1em">POSIX:
|
|
215
|
+
<p style="margin-left:11%; margin-top: 1em">POSIX:2024</p>
|
|
216
|
+
|
|
217
|
+
<h2>NOTES
|
|
218
|
+
<a name="NOTES"></a>
|
|
219
|
+
</h2>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<p style="margin-left:11%; margin-top: 1em">In each series
|
|
223
|
+
of calls to the <b>iconv</b> function, the last should be
|
|
224
|
+
one with <i>inbuf</i> or <i>*inbuf</i> equal to NULL, in
|
|
225
|
+
order to complete the conversion of any partially converted
|
|
226
|
+
input.</p>
|
|
227
|
+
|
|
228
|
+
<p style="margin-left:11%; margin-top: 1em">Although
|
|
229
|
+
<i>inbuf</i> and <i>outbuf</i> are typed as <b>const char
|
|
230
|
+
**</b> and <b>char **</b>, respectively, this does not mean
|
|
231
|
+
that the objects they point can be interpreted as C strings
|
|
232
|
+
or as arrays of characters: the interpretation of character
|
|
233
|
+
byte sequences is handled internally by the conversion
|
|
234
|
+
functions. In some encodings, a zero byte may be a valid
|
|
235
|
+
part of a multibyte character.</p>
|
|
236
|
+
|
|
237
|
+
<p style="margin-left:11%; margin-top: 1em">The caller of
|
|
238
|
+
the <b>iconv</b> function must ensure that the pointers
|
|
239
|
+
passed to the function are suitable for accessing characters
|
|
240
|
+
in the appropriate character set. For the encodings
|
|
241
|
+
<b>UCS-2-INTERNAL</b>, <b>UCS-4-INTERNAL</b>, and
|
|
242
|
+
<b>wchar_t</b>, this includes ensuring correct
|
|
243
|
+
alignment.</p>
|
|
195
244
|
|
|
196
245
|
<h2>SEE ALSO
|
|
197
246
|
<a name="SEE ALSO"></a>
|
|
@@ -200,7 +249,7 @@ the input.</p></td></tr>
|
|
|
200
249
|
|
|
201
250
|
|
|
202
251
|
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
|
|
203
|
-
<b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
|
|
252
|
+
<b>iconvctl</b>(3), <b>iconv_close</b>(3)</p>
|
|
204
253
|
<hr>
|
|
205
254
|
</body>
|
|
206
255
|
</html>
|