4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 * COPYRIGHT AND PERMISSION NOTICE
28 * Copyright (c) 1991-2006 Unicode, Inc. All rights reserved. Distributed under
29 * the Terms of Use in http://www.unicode.org/copyright.html.
31 * Permission is hereby granted, free of charge, to any person obtaining
32 * a copy of the Unicode data files and any associated documentation (the
33 * "Data Files") or Unicode software and any associated documentation (the
34 * "Software") to deal in the Data Files or Software without restriction,
35 * including without limitation the rights to use, copy, modify, merge,
36 * publish, distribute, and/or sell copies of the Data Files or Software, and
37 * to permit persons to whom the Data Files or Software are furnished to do so,
38 * provided that (a) the above copyright notice(s) and this permission notice
39 * appear with all copies of the Data Files or Software, (b) both the above
40 * copyright notice(s) and this permission notice appear in associated
41 * documentation, and (c) there is clear notice in each modified Data File or
42 * in the Software as well as in the documentation associated with the Data
43 * File(s) or Software that the data or software has been modified.
45 * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
46 * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
47 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
48 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
49 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
50 * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
51 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
52 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
53 * OF THE DATA FILES OR SOFTWARE.
55 * Except as contained in this notice, the name of a copyright holder shall not
56 * be used in advertising or otherwise to promote the sale, use or other
57 * dealings in these Data Files or Software without prior written authorization
58 * of the copyright holder.
60 * Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
61 * registered in some jurisdictions. All other trademarks and registered
62 * trademarks mentioned herein are the property of their respective owners.
65 * This file has been modified by Sun Microsystems, Inc.
68 #ifndef _SYS_KICONV_LATIN1_H
69 #define _SYS_KICONV_LATIN1_H
71 #pragma ident "%Z%%M% %I% %E% SMI"
77 #include <sys/kiconv.h>
82 * Mapping tables from CP1252, ISO 8859-1, ISO 8859-15, and CP850 to UTF-8.
84 * Indices are calculated by subtracting 0x80 from single byte character code
87 * Each component has up to three UTF-8 character bytes; the first byte will
88 * be used to figure out on how many bytes should be taken. If size figured
89 * out has a value less than zero, that means that component isn't valid and
90 * has no assigned character.
92 static const kiconv_to_utf8_tbl_comp_t to_u8_tbl
[4][128] = {
93 { /* CP1252 -> UTF-8 */
94 { 0xE2, 0x82, 0xAC }, /* 0x80 */
95 { 0xFE, 0xFE, 0xFE }, /* 0x81 (illegal character) */
96 { 0xE2, 0x80, 0x9A }, /* 0x82 */
97 { 0xC6, 0x92, 0x00 }, /* 0x83 */
98 { 0xE2, 0x80, 0x9E }, /* 0x84 */
99 { 0xE2, 0x80, 0xA6 }, /* 0x85 */
100 { 0xE2, 0x80, 0xA0 }, /* 0x86 */
101 { 0xE2, 0x80, 0xA1 }, /* 0x87 */
102 { 0xCB, 0x86, 0x00 }, /* 0x88 */
103 { 0xE2, 0x80, 0xB0 }, /* 0x89 */
104 { 0xC5, 0xA0, 0x00 }, /* 0x8A */
105 { 0xE2, 0x80, 0xB9 }, /* 0x8B */
106 { 0xC5, 0x92, 0x00 }, /* 0x8C */
107 { 0xFE, 0xFE, 0xFE }, /* 0x8D (illegal character) */
108 { 0xC5, 0xBD, 0x00 }, /* 0x8E */
109 { 0xFE, 0xFE, 0xFE }, /* 0x8F (illegal character) */
110 { 0xFE, 0xFE, 0xFE }, /* 0x90 (illegal character) */
111 { 0xE2, 0x80, 0x98 }, /* 0x91 */
112 { 0xE2, 0x80, 0x99 }, /* 0x92 */
113 { 0xE2, 0x80, 0x9C }, /* 0x93 */
114 { 0xE2, 0x80, 0x9D }, /* 0x94 */
115 { 0xE2, 0x80, 0xA2 }, /* 0x95 */
116 { 0xE2, 0x80, 0x93 }, /* 0x96 */
117 { 0xE2, 0x80, 0x94 }, /* 0x97 */
118 { 0xCB, 0x9C, 0x00 }, /* 0x98 */
119 { 0xE2, 0x84, 0xA2 }, /* 0x99 */
120 { 0xC5, 0xA1, 0x00 }, /* 0x9A */
121 { 0xE2, 0x80, 0xBA }, /* 0x9B */
122 { 0xC5, 0x93, 0x00 }, /* 0x9C */
123 { 0xFE, 0xFE, 0xFE }, /* 0x9D (illegal character) */
124 { 0xC5, 0xBE, 0x00 }, /* 0x9E */
125 { 0xC5, 0xB8, 0x00 }, /* 0x9F */
126 { 0xC2, 0xA0, 0x00 }, /* 0xA0 */
127 { 0xC2, 0xA1, 0x00 }, /* 0xA1 */
128 { 0xC2, 0xA2, 0x00 }, /* 0xA2 */
129 { 0xC2, 0xA3, 0x00 }, /* 0xA3 */
130 { 0xC2, 0xA4, 0x00 }, /* 0xA4 */
131 { 0xC2, 0xA5, 0x00 }, /* 0xA5 */
132 { 0xC2, 0xA6, 0x00 }, /* 0xA6 */
133 { 0xC2, 0xA7, 0x00 }, /* 0xA7 */
134 { 0xC2, 0xA8, 0x00 }, /* 0xA8 */
135 { 0xC2, 0xA9, 0x00 }, /* 0xA9 */
136 { 0xC2, 0xAA, 0x00 }, /* 0xAA */
137 { 0xC2, 0xAB, 0x00 }, /* 0xAB */
138 { 0xC2, 0xAC, 0x00 }, /* 0xAC */
139 { 0xC2, 0xAD, 0x00 }, /* 0xAD */
140 { 0xC2, 0xAE, 0x00 }, /* 0xAE */
141 { 0xC2, 0xAF, 0x00 }, /* 0xAF */
142 { 0xC2, 0xB0, 0x00 }, /* 0xB0 */
143 { 0xC2, 0xB1, 0x00 }, /* 0xB1 */
144 { 0xC2, 0xB2, 0x00 }, /* 0xB2 */
145 { 0xC2, 0xB3, 0x00 }, /* 0xB3 */
146 { 0xC2, 0xB4, 0x00 }, /* 0xB4 */
147 { 0xC2, 0xB5, 0x00 }, /* 0xB5 */
148 { 0xC2, 0xB6, 0x00 }, /* 0xB6 */
149 { 0xC2, 0xB7, 0x00 }, /* 0xB7 */
150 { 0xC2, 0xB8, 0x00 }, /* 0xB8 */
151 { 0xC2, 0xB9, 0x00 }, /* 0xB9 */
152 { 0xC2, 0xBA, 0x00 }, /* 0xBA */
153 { 0xC2, 0xBB, 0x00 }, /* 0xBB */
154 { 0xC2, 0xBC, 0x00 }, /* 0xBC */
155 { 0xC2, 0xBD, 0x00 }, /* 0xBD */
156 { 0xC2, 0xBE, 0x00 }, /* 0xBE */
157 { 0xC2, 0xBF, 0x00 }, /* 0xBF */
158 { 0xC3, 0x80, 0x00 }, /* 0xC0 */
159 { 0xC3, 0x81, 0x00 }, /* 0xC1 */
160 { 0xC3, 0x82, 0x00 }, /* 0xC2 */
161 { 0xC3, 0x83, 0x00 }, /* 0xC3 */
162 { 0xC3, 0x84, 0x00 }, /* 0xC4 */
163 { 0xC3, 0x85, 0x00 }, /* 0xC5 */
164 { 0xC3, 0x86, 0x00 }, /* 0xC6 */
165 { 0xC3, 0x87, 0x00 }, /* 0xC7 */
166 { 0xC3, 0x88, 0x00 }, /* 0xC8 */
167 { 0xC3, 0x89, 0x00 }, /* 0xC9 */
168 { 0xC3, 0x8A, 0x00 }, /* 0xCA */
169 { 0xC3, 0x8B, 0x00 }, /* 0xCB */
170 { 0xC3, 0x8C, 0x00 }, /* 0xCC */
171 { 0xC3, 0x8D, 0x00 }, /* 0xCD */
172 { 0xC3, 0x8E, 0x00 }, /* 0xCE */
173 { 0xC3, 0x8F, 0x00 }, /* 0xCF */
174 { 0xC3, 0x90, 0x00 }, /* 0xD0 */
175 { 0xC3, 0x91, 0x00 }, /* 0xD1 */
176 { 0xC3, 0x92, 0x00 }, /* 0xD2 */
177 { 0xC3, 0x93, 0x00 }, /* 0xD3 */
178 { 0xC3, 0x94, 0x00 }, /* 0xD4 */
179 { 0xC3, 0x95, 0x00 }, /* 0xD5 */
180 { 0xC3, 0x96, 0x00 }, /* 0xD6 */
181 { 0xC3, 0x97, 0x00 }, /* 0xD7 */
182 { 0xC3, 0x98, 0x00 }, /* 0xD8 */
183 { 0xC3, 0x99, 0x00 }, /* 0xD9 */
184 { 0xC3, 0x9A, 0x00 }, /* 0xDA */
185 { 0xC3, 0x9B, 0x00 }, /* 0xDB */
186 { 0xC3, 0x9C, 0x00 }, /* 0xDC */
187 { 0xC3, 0x9D, 0x00 }, /* 0xDD */
188 { 0xC3, 0x9E, 0x00 }, /* 0xDE */
189 { 0xC3, 0x9F, 0x00 }, /* 0xDF */
190 { 0xC3, 0xA0, 0x00 }, /* 0xE0 */
191 { 0xC3, 0xA1, 0x00 }, /* 0xE1 */
192 { 0xC3, 0xA2, 0x00 }, /* 0xE2 */
193 { 0xC3, 0xA3, 0x00 }, /* 0xE3 */
194 { 0xC3, 0xA4, 0x00 }, /* 0xE4 */
195 { 0xC3, 0xA5, 0x00 }, /* 0xE5 */
196 { 0xC3, 0xA6, 0x00 }, /* 0xE6 */
197 { 0xC3, 0xA7, 0x00 }, /* 0xE7 */
198 { 0xC3, 0xA8, 0x00 }, /* 0xE8 */
199 { 0xC3, 0xA9, 0x00 }, /* 0xE9 */
200 { 0xC3, 0xAA, 0x00 }, /* 0xEA */
201 { 0xC3, 0xAB, 0x00 }, /* 0xEB */
202 { 0xC3, 0xAC, 0x00 }, /* 0xEC */
203 { 0xC3, 0xAD, 0x00 }, /* 0xED */
204 { 0xC3, 0xAE, 0x00 }, /* 0xEE */
205 { 0xC3, 0xAF, 0x00 }, /* 0xEF */
206 { 0xC3, 0xB0, 0x00 }, /* 0xF0 */
207 { 0xC3, 0xB1, 0x00 }, /* 0xF1 */
208 { 0xC3, 0xB2, 0x00 }, /* 0xF2 */
209 { 0xC3, 0xB3, 0x00 }, /* 0xF3 */
210 { 0xC3, 0xB4, 0x00 }, /* 0xF4 */
211 { 0xC3, 0xB5, 0x00 }, /* 0xF5 */
212 { 0xC3, 0xB6, 0x00 }, /* 0xF6 */
213 { 0xC3, 0xB7, 0x00 }, /* 0xF7 */
214 { 0xC3, 0xB8, 0x00 }, /* 0xF8 */
215 { 0xC3, 0xB9, 0x00 }, /* 0xF9 */
216 { 0xC3, 0xBA, 0x00 }, /* 0xFA */
217 { 0xC3, 0xBB, 0x00 }, /* 0xFB */
218 { 0xC3, 0xBC, 0x00 }, /* 0xFC */
219 { 0xC3, 0xBD, 0x00 }, /* 0xFD */
220 { 0xC3, 0xBE, 0x00 }, /* 0xFE */
221 { 0xC3, 0xBF, 0x00 }, /* 0xFF */
223 { /* ISO 8859-1 -> UTF-8 */
224 { 0xC2, 0x80, 0x00 }, /* 0x80 */
225 { 0xC2, 0x81, 0x00 }, /* 0x81 */
226 { 0xC2, 0x82, 0x00 }, /* 0x82 */
227 { 0xC2, 0x83, 0x00 }, /* 0x83 */
228 { 0xC2, 0x84, 0x00 }, /* 0x84 */
229 { 0xC2, 0x85, 0x00 }, /* 0x85 */
230 { 0xC2, 0x86, 0x00 }, /* 0x86 */
231 { 0xC2, 0x87, 0x00 }, /* 0x87 */
232 { 0xC2, 0x88, 0x00 }, /* 0x88 */
233 { 0xC2, 0x89, 0x00 }, /* 0x89 */
234 { 0xC2, 0x8A, 0x00 }, /* 0x8A */
235 { 0xC2, 0x8B, 0x00 }, /* 0x8B */
236 { 0xC2, 0x8C, 0x00 }, /* 0x8C */
237 { 0xC2, 0x8D, 0x00 }, /* 0x8D */
238 { 0xC2, 0x8E, 0x00 }, /* 0x8E */
239 { 0xC2, 0x8F, 0x00 }, /* 0x8F */
240 { 0xC2, 0x90, 0x00 }, /* 0x90 */
241 { 0xC2, 0x91, 0x00 }, /* 0x91 */
242 { 0xC2, 0x92, 0x00 }, /* 0x92 */
243 { 0xC2, 0x93, 0x00 }, /* 0x93 */
244 { 0xC2, 0x94, 0x00 }, /* 0x94 */
245 { 0xC2, 0x95, 0x00 }, /* 0x95 */
246 { 0xC2, 0x96, 0x00 }, /* 0x96 */
247 { 0xC2, 0x97, 0x00 }, /* 0x97 */
248 { 0xC2, 0x98, 0x00 }, /* 0x98 */
249 { 0xC2, 0x99, 0x00 }, /* 0x99 */
250 { 0xC2, 0x9A, 0x00 }, /* 0x9A */
251 { 0xC2, 0x9B, 0x00 }, /* 0x9B */
252 { 0xC2, 0x9C, 0x00 }, /* 0x9C */
253 { 0xC2, 0x9D, 0x00 }, /* 0x9D */
254 { 0xC2, 0x9E, 0x00 }, /* 0x9E */
255 { 0xC2, 0x9F, 0x00 }, /* 0x9F */
256 { 0xC2, 0xA0, 0x00 }, /* 0xA0 */
257 { 0xC2, 0xA1, 0x00 }, /* 0xA1 */
258 { 0xC2, 0xA2, 0x00 }, /* 0xA2 */
259 { 0xC2, 0xA3, 0x00 }, /* 0xA3 */
260 { 0xC2, 0xA4, 0x00 }, /* 0xA4 */
261 { 0xC2, 0xA5, 0x00 }, /* 0xA5 */
262 { 0xC2, 0xA6, 0x00 }, /* 0xA6 */
263 { 0xC2, 0xA7, 0x00 }, /* 0xA7 */
264 { 0xC2, 0xA8, 0x00 }, /* 0xA8 */
265 { 0xC2, 0xA9, 0x00 }, /* 0xA9 */
266 { 0xC2, 0xAA, 0x00 }, /* 0xAA */
267 { 0xC2, 0xAB, 0x00 }, /* 0xAB */
268 { 0xC2, 0xAC, 0x00 }, /* 0xAC */
269 { 0xC2, 0xAD, 0x00 }, /* 0xAD */
270 { 0xC2, 0xAE, 0x00 }, /* 0xAE */
271 { 0xC2, 0xAF, 0x00 }, /* 0xAF */
272 { 0xC2, 0xB0, 0x00 }, /* 0xB0 */
273 { 0xC2, 0xB1, 0x00 }, /* 0xB1 */
274 { 0xC2, 0xB2, 0x00 }, /* 0xB2 */
275 { 0xC2, 0xB3, 0x00 }, /* 0xB3 */
276 { 0xC2, 0xB4, 0x00 }, /* 0xB4 */
277 { 0xC2, 0xB5, 0x00 }, /* 0xB5 */
278 { 0xC2, 0xB6, 0x00 }, /* 0xB6 */
279 { 0xC2, 0xB7, 0x00 }, /* 0xB7 */
280 { 0xC2, 0xB8, 0x00 }, /* 0xB8 */
281 { 0xC2, 0xB9, 0x00 }, /* 0xB9 */
282 { 0xC2, 0xBA, 0x00 }, /* 0xBA */
283 { 0xC2, 0xBB, 0x00 }, /* 0xBB */
284 { 0xC2, 0xBC, 0x00 }, /* 0xBC */
285 { 0xC2, 0xBD, 0x00 }, /* 0xBD */
286 { 0xC2, 0xBE, 0x00 }, /* 0xBE */
287 { 0xC2, 0xBF, 0x00 }, /* 0xBF */
288 { 0xC3, 0x80, 0x00 }, /* 0xC0 */
289 { 0xC3, 0x81, 0x00 }, /* 0xC1 */
290 { 0xC3, 0x82, 0x00 }, /* 0xC2 */
291 { 0xC3, 0x83, 0x00 }, /* 0xC3 */
292 { 0xC3, 0x84, 0x00 }, /* 0xC4 */
293 { 0xC3, 0x85, 0x00 }, /* 0xC5 */
294 { 0xC3, 0x86, 0x00 }, /* 0xC6 */
295 { 0xC3, 0x87, 0x00 }, /* 0xC7 */
296 { 0xC3, 0x88, 0x00 }, /* 0xC8 */
297 { 0xC3, 0x89, 0x00 }, /* 0xC9 */
298 { 0xC3, 0x8A, 0x00 }, /* 0xCA */
299 { 0xC3, 0x8B, 0x00 }, /* 0xCB */
300 { 0xC3, 0x8C, 0x00 }, /* 0xCC */
301 { 0xC3, 0x8D, 0x00 }, /* 0xCD */
302 { 0xC3, 0x8E, 0x00 }, /* 0xCE */
303 { 0xC3, 0x8F, 0x00 }, /* 0xCF */
304 { 0xC3, 0x90, 0x00 }, /* 0xD0 */
305 { 0xC3, 0x91, 0x00 }, /* 0xD1 */
306 { 0xC3, 0x92, 0x00 }, /* 0xD2 */
307 { 0xC3, 0x93, 0x00 }, /* 0xD3 */
308 { 0xC3, 0x94, 0x00 }, /* 0xD4 */
309 { 0xC3, 0x95, 0x00 }, /* 0xD5 */
310 { 0xC3, 0x96, 0x00 }, /* 0xD6 */
311 { 0xC3, 0x97, 0x00 }, /* 0xD7 */
312 { 0xC3, 0x98, 0x00 }, /* 0xD8 */
313 { 0xC3, 0x99, 0x00 }, /* 0xD9 */
314 { 0xC3, 0x9A, 0x00 }, /* 0xDA */
315 { 0xC3, 0x9B, 0x00 }, /* 0xDB */
316 { 0xC3, 0x9C, 0x00 }, /* 0xDC */
317 { 0xC3, 0x9D, 0x00 }, /* 0xDD */
318 { 0xC3, 0x9E, 0x00 }, /* 0xDE */
319 { 0xC3, 0x9F, 0x00 }, /* 0xDF */
320 { 0xC3, 0xA0, 0x00 }, /* 0xE0 */
321 { 0xC3, 0xA1, 0x00 }, /* 0xE1 */
322 { 0xC3, 0xA2, 0x00 }, /* 0xE2 */
323 { 0xC3, 0xA3, 0x00 }, /* 0xE3 */
324 { 0xC3, 0xA4, 0x00 }, /* 0xE4 */
325 { 0xC3, 0xA5, 0x00 }, /* 0xE5 */
326 { 0xC3, 0xA6, 0x00 }, /* 0xE6 */
327 { 0xC3, 0xA7, 0x00 }, /* 0xE7 */
328 { 0xC3, 0xA8, 0x00 }, /* 0xE8 */
329 { 0xC3, 0xA9, 0x00 }, /* 0xE9 */
330 { 0xC3, 0xAA, 0x00 }, /* 0xEA */
331 { 0xC3, 0xAB, 0x00 }, /* 0xEB */
332 { 0xC3, 0xAC, 0x00 }, /* 0xEC */
333 { 0xC3, 0xAD, 0x00 }, /* 0xED */
334 { 0xC3, 0xAE, 0x00 }, /* 0xEE */
335 { 0xC3, 0xAF, 0x00 }, /* 0xEF */
336 { 0xC3, 0xB0, 0x00 }, /* 0xF0 */
337 { 0xC3, 0xB1, 0x00 }, /* 0xF1 */
338 { 0xC3, 0xB2, 0x00 }, /* 0xF2 */
339 { 0xC3, 0xB3, 0x00 }, /* 0xF3 */
340 { 0xC3, 0xB4, 0x00 }, /* 0xF4 */
341 { 0xC3, 0xB5, 0x00 }, /* 0xF5 */
342 { 0xC3, 0xB6, 0x00 }, /* 0xF6 */
343 { 0xC3, 0xB7, 0x00 }, /* 0xF7 */
344 { 0xC3, 0xB8, 0x00 }, /* 0xF8 */
345 { 0xC3, 0xB9, 0x00 }, /* 0xF9 */
346 { 0xC3, 0xBA, 0x00 }, /* 0xFA */
347 { 0xC3, 0xBB, 0x00 }, /* 0xFB */
348 { 0xC3, 0xBC, 0x00 }, /* 0xFC */
349 { 0xC3, 0xBD, 0x00 }, /* 0xFD */
350 { 0xC3, 0xBE, 0x00 }, /* 0xFE */
351 { 0xC3, 0xBF, 0x00 }, /* 0xFF */
353 { /* ISO 8859-15 -> UTF-8 */
354 { 0xC2, 0x80, 0x00 }, /* 0x80 */
355 { 0xC2, 0x81, 0x00 }, /* 0x81 */
356 { 0xC2, 0x82, 0x00 }, /* 0x82 */
357 { 0xC2, 0x83, 0x00 }, /* 0x83 */
358 { 0xC2, 0x84, 0x00 }, /* 0x84 */
359 { 0xC2, 0x85, 0x00 }, /* 0x85 */
360 { 0xC2, 0x86, 0x00 }, /* 0x86 */
361 { 0xC2, 0x87, 0x00 }, /* 0x87 */
362 { 0xC2, 0x88, 0x00 }, /* 0x88 */
363 { 0xC2, 0x89, 0x00 }, /* 0x89 */
364 { 0xC2, 0x8A, 0x00 }, /* 0x8A */
365 { 0xC2, 0x8B, 0x00 }, /* 0x8B */
366 { 0xC2, 0x8C, 0x00 }, /* 0x8C */
367 { 0xC2, 0x8D, 0x00 }, /* 0x8D */
368 { 0xC2, 0x8E, 0x00 }, /* 0x8E */
369 { 0xC2, 0x8F, 0x00 }, /* 0x8F */
370 { 0xC2, 0x90, 0x00 }, /* 0x90 */
371 { 0xC2, 0x91, 0x00 }, /* 0x91 */
372 { 0xC2, 0x92, 0x00 }, /* 0x92 */
373 { 0xC2, 0x93, 0x00 }, /* 0x93 */
374 { 0xC2, 0x94, 0x00 }, /* 0x94 */
375 { 0xC2, 0x95, 0x00 }, /* 0x95 */
376 { 0xC2, 0x96, 0x00 }, /* 0x96 */
377 { 0xC2, 0x97, 0x00 }, /* 0x97 */
378 { 0xC2, 0x98, 0x00 }, /* 0x98 */
379 { 0xC2, 0x99, 0x00 }, /* 0x99 */
380 { 0xC2, 0x9A, 0x00 }, /* 0x9A */
381 { 0xC2, 0x9B, 0x00 }, /* 0x9B */
382 { 0xC2, 0x9C, 0x00 }, /* 0x9C */
383 { 0xC2, 0x9D, 0x00 }, /* 0x9D */
384 { 0xC2, 0x9E, 0x00 }, /* 0x9E */
385 { 0xC2, 0x9F, 0x00 }, /* 0x9F */
386 { 0xC2, 0xA0, 0x00 }, /* 0xA0 */
387 { 0xC2, 0xA1, 0x00 }, /* 0xA1 */
388 { 0xC2, 0xA2, 0x00 }, /* 0xA2 */
389 { 0xC2, 0xA3, 0x00 }, /* 0xA3 */
390 { 0xE2, 0x82, 0xAC }, /* 0xA4 */
391 { 0xC2, 0xA5, 0x00 }, /* 0xA5 */
392 { 0xC5, 0xA0, 0x00 }, /* 0xA6 */
393 { 0xC2, 0xA7, 0x00 }, /* 0xA7 */
394 { 0xC5, 0xA1, 0x00 }, /* 0xA8 */
395 { 0xC2, 0xA9, 0x00 }, /* 0xA9 */
396 { 0xC2, 0xAA, 0x00 }, /* 0xAA */
397 { 0xC2, 0xAB, 0x00 }, /* 0xAB */
398 { 0xC2, 0xAC, 0x00 }, /* 0xAC */
399 { 0xC2, 0xAD, 0x00 }, /* 0xAD */
400 { 0xC2, 0xAE, 0x00 }, /* 0xAE */
401 { 0xC2, 0xAF, 0x00 }, /* 0xAF */
402 { 0xC2, 0xB0, 0x00 }, /* 0xB0 */
403 { 0xC2, 0xB1, 0x00 }, /* 0xB1 */
404 { 0xC2, 0xB2, 0x00 }, /* 0xB2 */
405 { 0xC2, 0xB3, 0x00 }, /* 0xB3 */
406 { 0xC5, 0xBD, 0x00 }, /* 0xB4 */
407 { 0xC2, 0xB5, 0x00 }, /* 0xB5 */
408 { 0xC2, 0xB6, 0x00 }, /* 0xB6 */
409 { 0xC2, 0xB7, 0x00 }, /* 0xB7 */
410 { 0xC5, 0xBE, 0x00 }, /* 0xB8 */
411 { 0xC2, 0xB9, 0x00 }, /* 0xB9 */
412 { 0xC2, 0xBA, 0x00 }, /* 0xBA */
413 { 0xC2, 0xBB, 0x00 }, /* 0xBB */
414 { 0xC5, 0x92, 0x00 }, /* 0xBC */
415 { 0xC5, 0x93, 0x00 }, /* 0xBD */
416 { 0xC5, 0xB8, 0x00 }, /* 0xBE */
417 { 0xC2, 0xBF, 0x00 }, /* 0xBF */
418 { 0xC3, 0x80, 0x00 }, /* 0xC0 */
419 { 0xC3, 0x81, 0x00 }, /* 0xC1 */
420 { 0xC3, 0x82, 0x00 }, /* 0xC2 */
421 { 0xC3, 0x83, 0x00 }, /* 0xC3 */
422 { 0xC3, 0x84, 0x00 }, /* 0xC4 */
423 { 0xC3, 0x85, 0x00 }, /* 0xC5 */
424 { 0xC3, 0x86, 0x00 }, /* 0xC6 */
425 { 0xC3, 0x87, 0x00 }, /* 0xC7 */
426 { 0xC3, 0x88, 0x00 }, /* 0xC8 */
427 { 0xC3, 0x89, 0x00 }, /* 0xC9 */
428 { 0xC3, 0x8A, 0x00 }, /* 0xCA */
429 { 0xC3, 0x8B, 0x00 }, /* 0xCB */
430 { 0xC3, 0x8C, 0x00 }, /* 0xCC */
431 { 0xC3, 0x8D, 0x00 }, /* 0xCD */
432 { 0xC3, 0x8E, 0x00 }, /* 0xCE */
433 { 0xC3, 0x8F, 0x00 }, /* 0xCF */
434 { 0xC3, 0x90, 0x00 }, /* 0xD0 */
435 { 0xC3, 0x91, 0x00 }, /* 0xD1 */
436 { 0xC3, 0x92, 0x00 }, /* 0xD2 */
437 { 0xC3, 0x93, 0x00 }, /* 0xD3 */
438 { 0xC3, 0x94, 0x00 }, /* 0xD4 */
439 { 0xC3, 0x95, 0x00 }, /* 0xD5 */
440 { 0xC3, 0x96, 0x00 }, /* 0xD6 */
441 { 0xC3, 0x97, 0x00 }, /* 0xD7 */
442 { 0xC3, 0x98, 0x00 }, /* 0xD8 */
443 { 0xC3, 0x99, 0x00 }, /* 0xD9 */
444 { 0xC3, 0x9A, 0x00 }, /* 0xDA */
445 { 0xC3, 0x9B, 0x00 }, /* 0xDB */
446 { 0xC3, 0x9C, 0x00 }, /* 0xDC */
447 { 0xC3, 0x9D, 0x00 }, /* 0xDD */
448 { 0xC3, 0x9E, 0x00 }, /* 0xDE */
449 { 0xC3, 0x9F, 0x00 }, /* 0xDF */
450 { 0xC3, 0xA0, 0x00 }, /* 0xE0 */
451 { 0xC3, 0xA1, 0x00 }, /* 0xE1 */
452 { 0xC3, 0xA2, 0x00 }, /* 0xE2 */
453 { 0xC3, 0xA3, 0x00 }, /* 0xE3 */
454 { 0xC3, 0xA4, 0x00 }, /* 0xE4 */
455 { 0xC3, 0xA5, 0x00 }, /* 0xE5 */
456 { 0xC3, 0xA6, 0x00 }, /* 0xE6 */
457 { 0xC3, 0xA7, 0x00 }, /* 0xE7 */
458 { 0xC3, 0xA8, 0x00 }, /* 0xE8 */
459 { 0xC3, 0xA9, 0x00 }, /* 0xE9 */
460 { 0xC3, 0xAA, 0x00 }, /* 0xEA */
461 { 0xC3, 0xAB, 0x00 }, /* 0xEB */
462 { 0xC3, 0xAC, 0x00 }, /* 0xEC */
463 { 0xC3, 0xAD, 0x00 }, /* 0xED */
464 { 0xC3, 0xAE, 0x00 }, /* 0xEE */
465 { 0xC3, 0xAF, 0x00 }, /* 0xEF */
466 { 0xC3, 0xB0, 0x00 }, /* 0xF0 */
467 { 0xC3, 0xB1, 0x00 }, /* 0xF1 */
468 { 0xC3, 0xB2, 0x00 }, /* 0xF2 */
469 { 0xC3, 0xB3, 0x00 }, /* 0xF3 */
470 { 0xC3, 0xB4, 0x00 }, /* 0xF4 */
471 { 0xC3, 0xB5, 0x00 }, /* 0xF5 */
472 { 0xC3, 0xB6, 0x00 }, /* 0xF6 */
473 { 0xC3, 0xB7, 0x00 }, /* 0xF7 */
474 { 0xC3, 0xB8, 0x00 }, /* 0xF8 */
475 { 0xC3, 0xB9, 0x00 }, /* 0xF9 */
476 { 0xC3, 0xBA, 0x00 }, /* 0xFA */
477 { 0xC3, 0xBB, 0x00 }, /* 0xFB */
478 { 0xC3, 0xBC, 0x00 }, /* 0xFC */
479 { 0xC3, 0xBD, 0x00 }, /* 0xFD */
480 { 0xC3, 0xBE, 0x00 }, /* 0xFE */
481 { 0xC3, 0xBF, 0x00 }, /* 0xFF */
483 { /* CP850 -> UTF-8 */
484 { 0xC3, 0x87, 0x00 }, /* 0x80 */
485 { 0xC3, 0xBC, 0x00 }, /* 0x81 */
486 { 0xC3, 0xA9, 0x00 }, /* 0x82 */
487 { 0xC3, 0xA2, 0x00 }, /* 0x83 */
488 { 0xC3, 0xA4, 0x00 }, /* 0x84 */
489 { 0xC3, 0xA0, 0x00 }, /* 0x85 */
490 { 0xC3, 0xA5, 0x00 }, /* 0x86 */
491 { 0xC3, 0xA7, 0x00 }, /* 0x87 */
492 { 0xC3, 0xAA, 0x00 }, /* 0x88 */
493 { 0xC3, 0xAB, 0x00 }, /* 0x89 */
494 { 0xC3, 0xA8, 0x00 }, /* 0x8A */
495 { 0xC3, 0xAF, 0x00 }, /* 0x8B */
496 { 0xC3, 0xAE, 0x00 }, /* 0x8C */
497 { 0xC3, 0xAC, 0x00 }, /* 0x8D */
498 { 0xC3, 0x84, 0x00 }, /* 0x8E */
499 { 0xC3, 0x85, 0x00 }, /* 0x8F */
500 { 0xC3, 0x89, 0x00 }, /* 0x90 */
501 { 0xC3, 0xA6, 0x00 }, /* 0x91 */
502 { 0xC3, 0x86, 0x00 }, /* 0x92 */
503 { 0xC3, 0xB4, 0x00 }, /* 0x93 */
504 { 0xC3, 0xB6, 0x00 }, /* 0x94 */
505 { 0xC3, 0xB2, 0x00 }, /* 0x95 */
506 { 0xC3, 0xBB, 0x00 }, /* 0x96 */
507 { 0xC3, 0xB9, 0x00 }, /* 0x97 */
508 { 0xC3, 0xBF, 0x00 }, /* 0x98 */
509 { 0xC3, 0x96, 0x00 }, /* 0x99 */
510 { 0xC3, 0x9C, 0x00 }, /* 0x9A */
511 { 0xC3, 0xB8, 0x00 }, /* 0x9B */
512 { 0xC2, 0xA3, 0x00 }, /* 0x9C */
513 { 0xC3, 0x98, 0x00 }, /* 0x9D */
514 { 0xC3, 0x97, 0x00 }, /* 0x9E */
515 { 0xC6, 0x92, 0x00 }, /* 0x9F */
516 { 0xC3, 0xA1, 0x00 }, /* 0xA0 */
517 { 0xC3, 0xAD, 0x00 }, /* 0xA1 */
518 { 0xC3, 0xB3, 0x00 }, /* 0xA2 */
519 { 0xC3, 0xBA, 0x00 }, /* 0xA3 */
520 { 0xC3, 0xB1, 0x00 }, /* 0xA4 */
521 { 0xC3, 0x91, 0x00 }, /* 0xA5 */
522 { 0xC2, 0xAA, 0x00 }, /* 0xA6 */
523 { 0xC2, 0xBA, 0x00 }, /* 0xA7 */
524 { 0xC2, 0xBF, 0x00 }, /* 0xA8 */
525 { 0xC2, 0xAE, 0x00 }, /* 0xA9 */
526 { 0xC2, 0xAC, 0x00 }, /* 0xAA */
527 { 0xC2, 0xBD, 0x00 }, /* 0xAB */
528 { 0xC2, 0xBC, 0x00 }, /* 0xAC */
529 { 0xC2, 0xA1, 0x00 }, /* 0xAD */
530 { 0xC2, 0xAB, 0x00 }, /* 0xAE */
531 { 0xC2, 0xBB, 0x00 }, /* 0xAF */
532 { 0xE2, 0x96, 0x91 }, /* 0xB0 */
533 { 0xE2, 0x96, 0x92 }, /* 0xB1 */
534 { 0xE2, 0x96, 0x93 }, /* 0xB2 */
535 { 0xE2, 0x94, 0x82 }, /* 0xB3 */
536 { 0xE2, 0x94, 0xA4 }, /* 0xB4 */
537 { 0xC3, 0x81, 0x00 }, /* 0xB5 */
538 { 0xC3, 0x82, 0x00 }, /* 0xB6 */
539 { 0xC3, 0x80, 0x00 }, /* 0xB7 */
540 { 0xC2, 0xA9, 0x00 }, /* 0xB8 */
541 { 0xE2, 0x95, 0xA3 }, /* 0xB9 */
542 { 0xE2, 0x95, 0x91 }, /* 0xBA */
543 { 0xE2, 0x95, 0x97 }, /* 0xBB */
544 { 0xE2, 0x95, 0x9D }, /* 0xBC */
545 { 0xC2, 0xA2, 0x00 }, /* 0xBD */
546 { 0xC2, 0xA5, 0x00 }, /* 0xBE */
547 { 0xE2, 0x94, 0x90 }, /* 0xBF */
548 { 0xE2, 0x94, 0x94 }, /* 0xC0 */
549 { 0xE2, 0x94, 0xB4 }, /* 0xC1 */
550 { 0xE2, 0x94, 0xAC }, /* 0xC2 */
551 { 0xE2, 0x94, 0x9C }, /* 0xC3 */
552 { 0xE2, 0x94, 0x80 }, /* 0xC4 */
553 { 0xE2, 0x94, 0xBC }, /* 0xC5 */
554 { 0xC3, 0xA3, 0x00 }, /* 0xC6 */
555 { 0xC3, 0x83, 0x00 }, /* 0xC7 */
556 { 0xE2, 0x95, 0x9A }, /* 0xC8 */
557 { 0xE2, 0x95, 0x94 }, /* 0xC9 */
558 { 0xE2, 0x95, 0xA9 }, /* 0xCA */
559 { 0xE2, 0x95, 0xA6 }, /* 0xCB */
560 { 0xE2, 0x95, 0xA0 }, /* 0xCC */
561 { 0xE2, 0x95, 0x90 }, /* 0xCD */
562 { 0xE2, 0x95, 0xAC }, /* 0xCE */
563 { 0xC2, 0xA4, 0x00 }, /* 0xCF */
564 { 0xC3, 0xB0, 0x00 }, /* 0xD0 */
565 { 0xC3, 0x90, 0x00 }, /* 0xD1 */
566 { 0xC3, 0x8A, 0x00 }, /* 0xD2 */
567 { 0xC3, 0x8B, 0x00 }, /* 0xD3 */
568 { 0xC3, 0x88, 0x00 }, /* 0xD4 */
569 { 0xC4, 0xB1, 0x00 }, /* 0xD5 */
570 { 0xC3, 0x8D, 0x00 }, /* 0xD6 */
571 { 0xC3, 0x8E, 0x00 }, /* 0xD7 */
572 { 0xC3, 0x8F, 0x00 }, /* 0xD8 */
573 { 0xE2, 0x94, 0x98 }, /* 0xD9 */
574 { 0xE2, 0x94, 0x8C }, /* 0xDA */
575 { 0xE2, 0x96, 0x88 }, /* 0xDB */
576 { 0xE2, 0x96, 0x84 }, /* 0xDC */
577 { 0xC2, 0xA6, 0x00 }, /* 0xDD */
578 { 0xC3, 0x8C, 0x00 }, /* 0xDE */
579 { 0xE2, 0x96, 0x80 }, /* 0xDF */
580 { 0xC3, 0x93, 0x00 }, /* 0xE0 */
581 { 0xC3, 0x9F, 0x00 }, /* 0xE1 */
582 { 0xC3, 0x94, 0x00 }, /* 0xE2 */
583 { 0xC3, 0x92, 0x00 }, /* 0xE3 */
584 { 0xC3, 0xB5, 0x00 }, /* 0xE4 */
585 { 0xC3, 0x95, 0x00 }, /* 0xE5 */
586 { 0xC2, 0xB5, 0x00 }, /* 0xE6 */
587 { 0xC3, 0xBE, 0x00 }, /* 0xE7 */
588 { 0xC3, 0x9E, 0x00 }, /* 0xE8 */
589 { 0xC3, 0x9A, 0x00 }, /* 0xE9 */
590 { 0xC3, 0x9B, 0x00 }, /* 0xEA */
591 { 0xC3, 0x99, 0x00 }, /* 0xEB */
592 { 0xC3, 0xBD, 0x00 }, /* 0xEC */
593 { 0xC3, 0x9D, 0x00 }, /* 0xED */
594 { 0xC2, 0xAF, 0x00 }, /* 0xEE */
595 { 0xC2, 0xB4, 0x00 }, /* 0xEF */
596 { 0xC2, 0xAD, 0x00 }, /* 0xF0 */
597 { 0xC2, 0xB1, 0x00 }, /* 0xF1 */
598 { 0xE2, 0x80, 0x97 }, /* 0xF2 */
599 { 0xC2, 0xBE, 0x00 }, /* 0xF3 */
600 { 0xC2, 0xB6, 0x00 }, /* 0xF4 */
601 { 0xC2, 0xA7, 0x00 }, /* 0xF5 */
602 { 0xC3, 0xB7, 0x00 }, /* 0xF6 */
603 { 0xC2, 0xB8, 0x00 }, /* 0xF7 */
604 { 0xC2, 0xB0, 0x00 }, /* 0xF8 */
605 { 0xC2, 0xA8, 0x00 }, /* 0xF9 */
606 { 0xC2, 0xB7, 0x00 }, /* 0xFA */
607 { 0xC2, 0xB9, 0x00 }, /* 0xFB */
608 { 0xC2, 0xB3, 0x00 }, /* 0xFC */
609 { 0xC2, 0xB2, 0x00 }, /* 0xFD */
610 { 0xE2, 0x96, 0xA0 }, /* 0xFE */
611 { 0xC2, 0xA0, 0x00 }, /* 0xFF */
616 * Mapping tables from UTF-8 to CP1252, ISO 8859-1, ISO 8859-15, and CP850.
618 * Each table is sorted with UTF-8 values to be used with binary search.
619 * UTF-8 character byte values are saved at uint32_t:24 contiguously as
622 static const kiconv_to_sb_tbl_comp_t to_sb_tbl
[4][128] = {
623 { /* UTF-8 -> CP1252 */
753 { /* UTF-8 -> ISO 8859-1 */
883 { /* UTF-8 -> ISO 8859-15 */
1013 { /* UTF-8 -> CP850 */
1145 #endif /* _KERNEL */
1151 #endif /* _SYS_KICONV_LATIN1_H */