Mercurial > hg > octave-jordi > gnulib-hg
annotate lib/uniconv.in.h @ 18079:4c948fd76734 default tip master
autoupdate
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Mon, 24 Aug 2015 06:09:19 -0700 |
parents | ab58d4870664 |
children |
rev | line source |
---|---|
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 /* Conversions between Unicode and legacy encodings. |
17848 | 2 Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. |
13354
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify it |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 under the terms of the GNU Lesser General Public License as published |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 by the Free Software Foundation; either version 3 of the License, or |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 (at your option) any later version. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 Lesser General Public License for more details. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU Lesser General Public License |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 #ifndef _UNICONV_H |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 #define _UNICONV_H |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 /* Get size_t. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 #include <stddef.h> |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 #include "unitypes.h" |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 /* Get enum iconv_ilseq_handler. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 #include "iconveh.h" |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 /* Get uniconv_register_autodetect() declaration. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 #include "striconveha.h" |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 /* Get locale_charset() declaration. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 #include "localcharset.h" |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 #ifdef __cplusplus |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 extern "C" { |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 #endif |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 /* Converts an entire string, possibly including NUL bytes, from one encoding |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 to a Unicode encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 Converts a memory region given in encoding FROMCODE. FROMCODE is as for |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 iconv_open(3). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 The input is in the memory region between SRC (inclusive) and SRC + SRCLEN |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 (exclusive). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 array is filled with offsets into the result, i.e. the character starting |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]], |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 and other offsets are set to (size_t)(-1). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 RESULTBUF and *LENGTHP should initially be a scratch buffer and its size, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 or *RESULTBUF can be NULL. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
52 May erase the contents of the memory at RESULTBUF. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 If successful: The resulting Unicode string (non-NULL) is returned and its |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
54 length stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 memory allocation was necessary, or a freshly allocated memory block |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 otherwise. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 In case of error: NULL is returned and errno is set. Particular errno |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 values: EINVAL, EILSEQ, ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 extern uint8_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 u8_conv_from_encoding (const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
61 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
62 const char *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 uint8_t *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
65 extern uint16_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
66 u16_conv_from_encoding (const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
67 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
68 const char *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
69 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
70 uint16_t *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
71 extern uint32_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
72 u32_conv_from_encoding (const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
73 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
74 const char *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 uint32_t *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
77 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
78 /* Converts an entire Unicode string, possibly including NUL units, from a |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
79 Unicode encoding to a given encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
80 Converts a memory region to encoding TOCODE. TOCODE is as for |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
81 iconv_open(3). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
82 The input is in the memory region between SRC (inclusive) and SRC + SRCLEN |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
83 (exclusive). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
84 If OFFSETS is not NULL, it should point to an array of SRCLEN integers; this |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
85 array is filled with offsets into the result, i.e. the character starting |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
86 at SRC[i] corresponds to the character starting at (*RESULTP)[OFFSETS[i]], |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
87 and other offsets are set to (size_t)(-1). |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
88 RESULTBUF and *LENGTHP should initially be a scratch buffer and its size, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
89 or RESULTBUF can be NULL. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 May erase the contents of the memory at RESULTBUF. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 If successful: The resulting string (non-NULL) is returned and its length |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
92 stored in *LENGTHP. The resulting string is RESULTBUF if no dynamic memory |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 allocation was necessary, or a freshly allocated memory block otherwise. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 In case of error: NULL is returned and errno is set. Particular errno |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 values: EINVAL, EILSEQ, ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
97 u8_conv_to_encoding (const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
98 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
99 const uint8_t *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
100 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
101 char *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
102 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
103 u16_conv_to_encoding (const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
104 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
105 const uint16_t *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
106 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
107 char *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
108 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
109 u32_conv_to_encoding (const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
110 enum iconv_ilseq_handler handler, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
111 const uint32_t *src, size_t srclen, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
112 size_t *offsets, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
113 char *resultbuf, size_t *lengthp); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
114 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
115 /* Converts a NUL terminated string from a given encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
116 The result is malloc allocated, or NULL (with errno set) in case of error. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
117 Particular errno values: EILSEQ, ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
118 extern uint8_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
119 u8_strconv_from_encoding (const char *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
120 const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
121 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
122 extern uint16_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
123 u16_strconv_from_encoding (const char *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
124 const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
125 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
126 extern uint32_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
127 u32_strconv_from_encoding (const char *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
128 const char *fromcode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
129 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
130 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
131 /* Converts a NUL terminated string to a given encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
132 The result is malloc allocated, or NULL (with errno set) in case of error. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
133 Particular errno values: EILSEQ, ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
134 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
135 u8_strconv_to_encoding (const uint8_t *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
136 const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
137 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
138 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
139 u16_strconv_to_encoding (const uint16_t *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
140 const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
141 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
142 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
143 u32_strconv_to_encoding (const uint32_t *string, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
144 const char *tocode, |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
145 enum iconv_ilseq_handler handler); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
146 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
147 /* Converts a NUL terminated string from the locale encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
148 The result is malloc allocated, or NULL (with errno set) in case of error. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
149 Particular errno values: ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
150 extern uint8_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
151 u8_strconv_from_locale (const char *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
152 extern uint16_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
153 u16_strconv_from_locale (const char *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
154 extern uint32_t * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
155 u32_strconv_from_locale (const char *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
156 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
157 /* Converts a NUL terminated string to the locale encoding. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
158 The result is malloc allocated, or NULL (with errno set) in case of error. |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
159 Particular errno values: ENOMEM. */ |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
160 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
161 u8_strconv_to_locale (const uint8_t *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
162 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
163 u16_strconv_to_locale (const uint16_t *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
164 extern char * |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
165 u32_strconv_to_locale (const uint32_t *string); |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
166 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
167 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
168 #ifdef __cplusplus |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
169 } |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
170 #endif |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
171 |
86634e33e086
New module 'libunistring-optional'.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
172 #endif /* _UNICONV_H */ |