Modified the UGetCursor() routine to return a valid response if the
[xcircuit.git] / utf8encodings.c
blob4a3d2c6451afca3841b9547db9cf5f181ef0e3d4
1 /*-------------------------------------------------------------------------*/
2 /* utf8encodings.c --- translation tables between an encoding and UTF-8 */
3 /* Copyright (c) : see below */
4 /*-------------------------------------------------------------------------*/
5 /*-------------------------------------------------------------------------*/
6 /* written (ie. converted the tables) by Erik van der Wal, May 2014 */
7 /*-------------------------------------------------------------------------*/
9 #include <stdio.h>
11 /*-------------------------------------------------------------------------*/
12 /* The data in this file is based on a number of files from unicode.org */
13 /* The specific source of the translation is referenced in the heading */
14 /* above each encoding */
15 /* All these files contained the following copyright notice: */
16 /* (I underlined the relevant part) */
17 /*-------------------------------------------------------------------------*/
19 # Copyright (c) 1991-1999 Unicode, Inc. All Rights reserved.
21 # This file is provided as-is by Unicode, Inc. (The Unicode Consortium).
22 # No claims are made as to fitness for any particular purpose. No
23 # warranties of any kind are expressed or implied. The recipient
24 # agrees to determine applicability of information provided. If this
25 # file has been provided on optical media by Unicode, Inc., the sole
26 # remedy for any claim will be exchange of defective media within 90
27 # days of receipt.
29 # Unicode, Inc. hereby grants the right to freely use the information
30 # --------------------------
31 # supplied in this file in the creation of products supporting the
32 # Unicode Standard, and to make copies of this file in any form for
33 # internal or external distribution as long as this notice remains
34 # ------------------------------
35 # attached.
36 # --------
40 /* Since the character at index 0 can never be used, it is used to store */
41 /* the identification of the given encoding */
42 /* The encoding can be placed in random order, as long as it does start */
43 /* with the standard encoding and it ends with a NULL, to indicate the end */
44 /* of the list. */
45 /* Non-existent characters are encoded with the unicode character: */
46 /* 'REPLACEMENT CHARACTER' (typically a boxed question mark). */
48 #define REPLC_CHAR "\xef\xbf\xbd"
50 const char *utf8encodings[][256] = {
51 /*--------------------------------------------------------------------------*/
52 /* stdenc */
53 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/stdenc.txt */
54 /*--------------------------------------------------------------------------*/
56 /* 0x00 */ "Standard", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
57 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
58 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
59 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
60 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
61 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
62 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
63 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
64 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&","\xe2\x80\x99",
65 /* 0x28 */ "(", ")", "*", "+", ",", "\xc2\xad",".", "/",
66 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
67 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
68 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
69 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
70 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
71 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
72 /* 0x60 */ "\xe2\x80\x98","a","b", "c", "d", "e", "f", "g",
73 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
74 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
75 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", REPLC_CHAR,
76 /* 0x80 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
77 /* 0x84 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
78 /* 0x88 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
79 /* 0x8c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
80 /* 0x90 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
81 /* 0x94 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
82 /* 0x98 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
83 /* 0x9c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
84 /* 0xa0 */ REPLC_CHAR, "\xc2\xa1", "\xc2\xa2", "\xc2\xa3",
85 /* 0xa4 */ "\xe2\x81\x84", "\xc2\xa5", "\xc6\x92", "\xc2\xa7",
86 /* 0xa8 */ "\xc2\xa4", "'", "\xe2\x80\x9c", "\xc2\xab",
87 /* 0xac */ "\xe2\x80\xb9", "\xe2\x80\xba", "\xef\xac\x81", "\xef\xac\x82",
88 /* 0xb0 */ REPLC_CHAR, "\xe2\x80\x93", "\xe2\x80\xa0", "\xe2\x80\xa1",
89 /* 0xb4 */ "\xc2\xb7", REPLC_CHAR, "\xc2\xb6", "\xe2\x80\xa2",
90 /* 0xb8 */ "\xe2\x80\x9a", "\xe2\x80\x9e", "\xe2\x80\x9d", "\xc2\xbb",
91 /* 0xbc */ "\xe2\x80\xa6", "\xe2\x80\xb0", REPLC_CHAR, "\xc2\xbf",
92 /* 0xc0 */ REPLC_CHAR, "`", "\xc2\xb4", "\xcb\x86",
93 /* 0xc4 */ "\xcb\x9c", "\xc2\xaf", "\xcb\x98", "\xcb\x99",
94 /* 0xc8 */ "\xc2\xa8", REPLC_CHAR, "\xcb\x9a", "\xc2\xb8",
95 /* 0xcc */ REPLC_CHAR, "\xcb\x9d", "\xcb\x9b", "\xcb\x87",
96 /* 0xd0 */ "\xe2\x80\x94", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
97 /* 0xd4 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
98 /* 0xd8 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
99 /* 0xdc */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
100 /* 0xe0 */ REPLC_CHAR, "\xc3\x86", REPLC_CHAR, "\xc2\xaa",
101 /* 0xe4 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
102 /* 0xe8 */ "\xc5\x81", "\xc3\x98", "\xc5\x92", "\xc2\xba",
103 /* 0xec */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
104 /* 0xf0 */ REPLC_CHAR, "\xc3\xa6", REPLC_CHAR, REPLC_CHAR,
105 /* 0xf4 */ REPLC_CHAR, "\xc4\xb1", REPLC_CHAR, REPLC_CHAR,
106 /* 0xf8 */ "\xc5\x82", "\xc3\xb8", "\xc5\x93", "\xc3\x9f",
107 /* 0xfc */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR
109 /*--------------------------------------------------------------------------*/
110 /* symbol */
111 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt */
112 /*--------------------------------------------------------------------------*/
114 /* 0x00 */ "Symbol", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
115 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
116 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
117 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
118 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
119 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
120 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
121 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
122 /* 0x20 */ " ", "!", "\xe2\x88\x80", "#",
123 /* 0x24 */ "\xe2\x88\x83", "%", "&", "\xe2\x88\x8b",
124 /* 0x28 */ "(", ")", "\xe2\x88\x97", "+",
125 /* 0x2c */ ",", "\xe2\x88\x92", ".", "/",
126 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
127 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
128 /* 0x40 */ "\xe2\x89\x85", "\xce\x91", "\xce\x92", "\xce\xa7",
129 /* 0x44 */ "\xce\x94", "\xce\x95", "\xce\xa6", "\xce\x93",
130 /* 0x48 */ "\xce\x97", "\xce\x99", "\xcf\x91", "\xce\x9a",
131 /* 0x4c */ "\xce\x9b", "\xce\x9c", "\xce\x9d", "\xce\x9f",
132 /* 0x50 */ "\xce\xa0", "\xce\x98", "\xce\xa1", "\xce\xa3",
133 /* 0x54 */ "\xce\xa4", "\xce\xa5", "\xcf\x82", "\xe2\x84\xa6",
134 /* 0x58 */ "\xce\x9e", "\xce\xa8", "\xce\x96", "[",
135 /* 0x5c */ "\xe2\x88\xb4", "]", "\xe2\x8a\xa5", "_",
136 /* 0x60 */ "\xef\xa3\xa5", "\xce\xb1", "\xce\xb2", "\xcf\x87",
137 /* 0x64 */ "\xce\xb4", "\xce\xb5", "\xcf\x86", "\xce\xb3",
138 /* 0x68 */ "\xce\xb7", "\xce\xb9", "\xcf\x95", "\xce\xba",
139 /* 0x6c */ "\xce\xbb", "\xc2\xb5", "\xce\xbd", "\xce\xbf",
140 /* 0x70 */ "\xcf\x80", "\xce\xb8", "\xcf\x81", "\xcf\x83",
141 /* 0x74 */ "\xcf\x84", "\xcf\x85", "\xcf\x96", "\xcf\x89",
142 /* 0x78 */ "\xce\xbe", "\xcf\x88", "\xce\xb6", "{",
143 /* 0x7c */ "|", "}", "\xe2\x88\xbc", REPLC_CHAR,
144 /* 0x80 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
145 /* 0x84 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
146 /* 0x88 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
147 /* 0x8c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
148 /* 0x90 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
149 /* 0x94 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
150 /* 0x98 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
151 /* 0x9c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
152 /* 0xa0 */ "\xe2\x82\xac", "\xcf\x92", "\xe2\x80\xb2", "\xe2\x89\xa4",
153 /* 0xa4 */ "\xe2\x88\x95", "\xe2\x88\x9e", "\xc6\x92", "\xe2\x99\xa3",
154 /* 0xa8 */ "\xe2\x99\xa6", "\xe2\x99\xa5", "\xe2\x99\xa0", "\xe2\x86\x94",
155 /* 0xac */ "\xe2\x86\x90", "\xe2\x86\x91", "\xe2\x86\x92", "\xe2\x86\x93",
156 /* 0xb0 */ "\xc2\xb0", "\xc2\xb1", "\xe2\x80\xb3", "\xe2\x89\xa5",
157 /* 0xb4 */ "\xc3\x97", "\xe2\x88\x9d", "\xe2\x88\x82", "\xe2\x80\xa2",
158 /* 0xb8 */ "\xc3\xb7", "\xe2\x89\xa0", "\xe2\x89\xa1", "\xe2\x89\x88",
159 /* 0xbc */ "\xe2\x80\xa6", "\xef\xa3\xa6", "\xef\xa3\xa7", "\xe2\x86\xb5",
160 /* 0xc0 */ "\xe2\x84\xb5", "\xe2\x84\x91", "\xe2\x84\x9c", "\xe2\x84\x98",
161 /* 0xc4 */ "\xe2\x8a\x97", "\xe2\x8a\x95", "\xe2\x88\x85", "\xe2\x88\xa9",
162 /* 0xc8 */ "\xe2\x88\xaa", "\xe2\x8a\x83", "\xe2\x8a\x87", "\xe2\x8a\x84",
163 /* 0xcc */ "\xe2\x8a\x82", "\xe2\x8a\x86", "\xe2\x88\x88", "\xe2\x88\x89",
164 /* 0xd0 */ "\xe2\x88\xa0", "\xe2\x88\x87", "\xef\x9b\x9a", "\xef\x9b\x99",
165 /* 0xd4 */ "\xef\x9b\x9b", "\xe2\x88\x8f", "\xe2\x88\x9a", "\xe2\x8b\x85",
166 /* 0xd8 */ "\xc2\xac", "\xe2\x88\xa7", "\xe2\x88\xa8", "\xe2\x87\x94",
167 /* 0xdc */ "\xe2\x87\x90", "\xe2\x87\x91", "\xe2\x87\x92", "\xe2\x87\x93",
168 /* 0xe0 */ "\xe2\x97\x8a", "\xe2\x8c\xa9", "\xef\xa3\xa8", "\xef\xa3\xa9",
169 /* 0xe4 */ "\xef\xa3\xaa", "\xe2\x88\x91", "\xef\xa3\xab", "\xef\xa3\xac",
170 /* 0xe8 */ "\xef\xa3\xad", "\xef\xa3\xae", "\xef\xa3\xaf", "\xef\xa3\xb0",
171 /* 0xec */ "\xef\xa3\xb1", "\xef\xa3\xb2", "\xef\xa3\xb3", "\xef\xa3\xb4",
172 /* 0xf0 */ REPLC_CHAR, "\xe2\x8c\xaa", "\xe2\x88\xab", "\xe2\x8c\xa0",
173 /* 0xf4 */ "\xef\xa3\xb5", "\xe2\x8c\xa1", "\xef\xa3\xb6", "\xef\xa3\xb7",
174 /* 0xf8 */ "\xef\xa3\xb8", "\xef\xa3\xb9", "\xef\xa3\xba", "\xef\xa3\xbb",
175 /* 0xfc */ "\xef\xa3\xbc", "\xef\xa3\xbd", "\xef\xa3\xbe", REPLC_CHAR
177 /*--------------------------------------------------------------------------*/
178 /* iso 8859-1 */
179 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-1.TXT */
180 /*--------------------------------------------------------------------------*/
182 /* 0x00 */ "ISOLatin1", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
183 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
184 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
185 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
186 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
187 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
188 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
189 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
190 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
191 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
192 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
193 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
194 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
195 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
196 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
197 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
198 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
199 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
200 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
201 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
202 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
203 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
204 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
205 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
206 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
207 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
208 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
209 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
210 /* 0xa0 */ "\xc2\xa0", "\xc2\xa1", "\xc2\xa2", "\xc2\xa3",
211 /* 0xa4 */ "\xc2\xa4", "\xc2\xa5", "\xc2\xa6", "\xc2\xa7",
212 /* 0xa8 */ "\xc2\xa8", "\xc2\xa9", "\xc2\xaa", "\xc2\xab",
213 /* 0xac */ "\xc2\xac", "\xc2\xad", "\xc2\xae", "\xc2\xaf",
214 /* 0xb0 */ "\xc2\xb0", "\xc2\xb1", "\xc2\xb2", "\xc2\xb3",
215 /* 0xb4 */ "\xc2\xb4", "\xc2\xb5", "\xc2\xb6", "\xc2\xb7",
216 /* 0xb8 */ "\xc2\xb8", "\xc2\xb9", "\xc2\xba", "\xc2\xbb",
217 /* 0xbc */ "\xc2\xbc", "\xc2\xbd", "\xc2\xbe", "\xc2\xbf",
218 /* 0xc0 */ "\xc3\x80", "\xc3\x81", "\xc3\x82", "\xc3\x83",
219 /* 0xc4 */ "\xc3\x84", "\xc3\x85", "\xc3\x86", "\xc3\x87",
220 /* 0xc8 */ "\xc3\x88", "\xc3\x89", "\xc3\x8a", "\xc3\x8b",
221 /* 0xcc */ "\xc3\x8c", "\xc3\x8d", "\xc3\x8e", "\xc3\x8f",
222 /* 0xd0 */ "\xc3\x90", "\xc3\x91", "\xc3\x92", "\xc3\x93",
223 /* 0xd4 */ "\xc3\x94", "\xc3\x95", "\xc3\x96", "\xc3\x97",
224 /* 0xd8 */ "\xc3\x98", "\xc3\x99", "\xc3\x9a", "\xc3\x9b",
225 /* 0xdc */ "\xc3\x9c", "\xc3\x9d", "\xc3\x9e", "\xc3\x9f",
226 /* 0xe0 */ "\xc3\xa0", "\xc3\xa1", "\xc3\xa2", "\xc3\xa3",
227 /* 0xe4 */ "\xc3\xa4", "\xc3\xa5", "\xc3\xa6", "\xc3\xa7",
228 /* 0xe8 */ "\xc3\xa8", "\xc3\xa9", "\xc3\xaa", "\xc3\xab",
229 /* 0xec */ "\xc3\xac", "\xc3\xad", "\xc3\xae", "\xc3\xaf",
230 /* 0xf0 */ "\xc3\xb0", "\xc3\xb1", "\xc3\xb2", "\xc3\xb3",
231 /* 0xf4 */ "\xc3\xb4", "\xc3\xb5", "\xc3\xb6", "\xc3\xb7",
232 /* 0xf8 */ "\xc3\xb8", "\xc3\xb9", "\xc3\xba", "\xc3\xbb",
233 /* 0xfc */ "\xc3\xbc", "\xc3\xbd", "\xc3\xbe", "\xc3\xbf"
235 /*--------------------------------------------------------------------------*/
236 /* iso 8859-2 */
237 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT */
238 /*--------------------------------------------------------------------------*/
240 /* 0x00 */ "ISOLatin2", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
241 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
242 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
243 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
244 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
245 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
246 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
247 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
248 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
249 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
250 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
251 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
252 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
253 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
254 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
255 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
256 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
257 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
258 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
259 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
260 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
261 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
262 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
263 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
264 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
265 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
266 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
267 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
268 /* 0xa0 */ "\xc2\xa0", "\xc4\x84", "\xcb\x98", "\xc5\x81",
269 /* 0xa4 */ "\xc2\xa4", "\xc4\xbd", "\xc5\x9a", "\xc2\xa7",
270 /* 0xa8 */ "\xc2\xa8", "\xc5\xa0", "\xc5\x9e", "\xc5\xa4",
271 /* 0xac */ "\xc5\xb9", "\xc2\xad", "\xc5\xbd", "\xc5\xbb",
272 /* 0xb0 */ "\xc2\xb0", "\xc4\x85", "\xcb\x9b", "\xc5\x82",
273 /* 0xb4 */ "\xc2\xb4", "\xc4\xbe", "\xc5\x9b", "\xcb\x87",
274 /* 0xb8 */ "\xc2\xb8", "\xc5\xa1", "\xc5\x9f", "\xc5\xa5",
275 /* 0xbc */ "\xc5\xba", "\xcb\x9d", "\xc5\xbe", "\xc5\xbc",
276 /* 0xc0 */ "\xc5\x94", "\xc3\x81", "\xc3\x82", "\xc4\x82",
277 /* 0xc4 */ "\xc3\x84", "\xc4\xb9", "\xc4\x86", "\xc3\x87",
278 /* 0xc8 */ "\xc4\x8c", "\xc3\x89", "\xc4\x98", "\xc3\x8b",
279 /* 0xcc */ "\xc4\x9a", "\xc3\x8d", "\xc3\x8e", "\xc4\x8e",
280 /* 0xd0 */ "\xc4\x90", "\xc5\x83", "\xc5\x87", "\xc3\x93",
281 /* 0xd4 */ "\xc3\x94", "\xc5\x90", "\xc3\x96", "\xc3\x97",
282 /* 0xd8 */ "\xc5\x98", "\xc5\xae", "\xc3\x9a", "\xc5\xb0",
283 /* 0xdc */ "\xc3\x9c", "\xc3\x9d", "\xc5\xa2", "\xc3\x9f",
284 /* 0xe0 */ "\xc5\x95", "\xc3\xa1", "\xc3\xa2", "\xc4\x83",
285 /* 0xe4 */ "\xc3\xa4", "\xc4\xba", "\xc4\x87", "\xc3\xa7",
286 /* 0xe8 */ "\xc4\x8d", "\xc3\xa9", "\xc4\x99", "\xc3\xab",
287 /* 0xec */ "\xc4\x9b", "\xc3\xad", "\xc3\xae", "\xc4\x8f",
288 /* 0xf0 */ "\xc4\x91", "\xc5\x84", "\xc5\x88", "\xc3\xb3",
289 /* 0xf4 */ "\xc3\xb4", "\xc5\x91", "\xc3\xb6", "\xc3\xb7",
290 /* 0xf8 */ "\xc5\x99", "\xc5\xaf", "\xc3\xba", "\xc5\xb1",
291 /* 0xfc */ "\xc3\xbc", "\xc3\xbd", "\xc5\xa3", "\xcb\x99"
293 /*--------------------------------------------------------------------------*/
294 /* iso 8859-3 */
295 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT */
296 /*--------------------------------------------------------------------------*/
298 /* 0x00 */ "ISOLatin3", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
299 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
300 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
301 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
302 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
303 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
304 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
305 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
306 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
307 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
308 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
309 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
310 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
311 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
312 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
313 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
314 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
315 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
316 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
317 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
318 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
319 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
320 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
321 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
322 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
323 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
324 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
325 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
326 /* 0xa0 */ "\xc2\xa0", "\xc4\xa6", "\xcb\x98", "\xc2\xa3",
327 /* 0xa4 */ "\xc2\xa4", REPLC_CHAR, "\xc4\xa4", "\xc2\xa7",
328 /* 0xa8 */ "\xc2\xa8", "\xc4\xb0", "\xc5\x9e", "\xc4\x9e",
329 /* 0xac */ "\xc4\xb4", "\xc2\xad", REPLC_CHAR, "\xc5\xbb",
330 /* 0xb0 */ "\xc2\xb0", "\xc4\xa7", "\xc2\xb2", "\xc2\xb3",
331 /* 0xb4 */ "\xc2\xb4", "\xc2\xb5", "\xc4\xa5", "\xc2\xb7",
332 /* 0xb8 */ "\xc2\xb8", "\xc4\xb1", "\xc5\x9f", "\xc4\x9f",
333 /* 0xbc */ "\xc4\xb5", "\xc2\xbd", REPLC_CHAR, "\xc5\xbc",
334 /* 0xc0 */ "\xc3\x80", "\xc3\x81", "\xc3\x82", REPLC_CHAR,
335 /* 0xc4 */ "\xc3\x84", "\xc4\x8a", "\xc4\x88", "\xc3\x87",
336 /* 0xc8 */ "\xc3\x88", "\xc3\x89", "\xc3\x8a", "\xc3\x8b",
337 /* 0xcc */ "\xc3\x8c", "\xc3\x8d", "\xc3\x8e", "\xc3\x8f",
338 /* 0xd0 */ REPLC_CHAR, "\xc3\x91", "\xc3\x92", "\xc3\x93",
339 /* 0xd4 */ "\xc3\x94", "\xc4\xa0", "\xc3\x96", "\xc3\x97",
340 /* 0xd8 */ "\xc4\x9c", "\xc3\x99", "\xc3\x9a", "\xc3\x9b",
341 /* 0xdc */ "\xc3\x9c", "\xc5\xac", "\xc5\x9c", "\xc3\x9f",
342 /* 0xe0 */ "\xc3\xa0", "\xc3\xa1", "\xc3\xa2", REPLC_CHAR,
343 /* 0xe4 */ "\xc3\xa4", "\xc4\x8b", "\xc4\x89", "\xc3\xa7",
344 /* 0xe8 */ "\xc3\xa8", "\xc3\xa9", "\xc3\xaa", "\xc3\xab",
345 /* 0xec */ "\xc3\xac", "\xc3\xad", "\xc3\xae", "\xc3\xaf",
346 /* 0xf0 */ REPLC_CHAR, "\xc3\xb1", "\xc3\xb2", "\xc3\xb3",
347 /* 0xf4 */ "\xc3\xb4", "\xc4\xa1", "\xc3\xb6", "\xc3\xb7",
348 /* 0xf8 */ "\xc4\x9d", "\xc3\xb9", "\xc3\xba", "\xc3\xbb",
349 /* 0xfc */ "\xc3\xbc", "\xc5\xad", "\xc5\x9d", "\xcb\x99"
351 /*--------------------------------------------------------------------------*/
352 /* iso 8859-4 */
353 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT */
354 /*--------------------------------------------------------------------------*/
356 /* 0x00 */ "ISOLatin4", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
357 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
358 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
359 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
360 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
361 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
362 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
363 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
364 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
365 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
366 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
367 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
368 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
369 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
370 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
371 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
372 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
373 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
374 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
375 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
376 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
377 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
378 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
379 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
380 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
381 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
382 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
383 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
384 /* 0xa0 */ "\xc2\xa0", "\xc4\x84", "\xc4\xb8", "\xc5\x96",
385 /* 0xa4 */ "\xc2\xa4", "\xc4\xa8", "\xc4\xbb", "\xc2\xa7",
386 /* 0xa8 */ "\xc2\xa8", "\xc5\xa0", "\xc4\x92", "\xc4\xa2",
387 /* 0xac */ "\xc5\xa6", "\xc2\xad", "\xc5\xbd", "\xc2\xaf",
388 /* 0xb0 */ "\xc2\xb0", "\xc4\x85", "\xcb\x9b", "\xc5\x97",
389 /* 0xb4 */ "\xc2\xb4", "\xc4\xa9", "\xc4\xbc", "\xcb\x87",
390 /* 0xb8 */ "\xc2\xb8", "\xc5\xa1", "\xc4\x93", "\xc4\xa3",
391 /* 0xbc */ "\xc5\xa7", "\xc5\x8a", "\xc5\xbe", "\xc5\x8b",
392 /* 0xc0 */ "\xc4\x80", "\xc3\x81", "\xc3\x82", "\xc3\x83",
393 /* 0xc4 */ "\xc3\x84", "\xc3\x85", "\xc3\x86", "\xc4\xae",
394 /* 0xc8 */ "\xc4\x8c", "\xc3\x89", "\xc4\x98", "\xc3\x8b",
395 /* 0xcc */ "\xc4\x96", "\xc3\x8d", "\xc3\x8e", "\xc4\xaa",
396 /* 0xd0 */ "\xc4\x90", "\xc5\x85", "\xc5\x8c", "\xc4\xb6",
397 /* 0xd4 */ "\xc3\x94", "\xc3\x95", "\xc3\x96", "\xc3\x97",
398 /* 0xd8 */ "\xc3\x98", "\xc5\xb2", "\xc3\x9a", "\xc3\x9b",
399 /* 0xdc */ "\xc3\x9c", "\xc5\xa8", "\xc5\xaa", "\xc3\x9f",
400 /* 0xe0 */ "\xc4\x81", "\xc3\xa1", "\xc3\xa2", "\xc3\xa3",
401 /* 0xe4 */ "\xc3\xa4", "\xc3\xa5", "\xc3\xa6", "\xc4\xaf",
402 /* 0xe8 */ "\xc4\x8d", "\xc3\xa9", "\xc4\x99", "\xc3\xab",
403 /* 0xec */ "\xc4\x97", "\xc3\xad", "\xc3\xae", "\xc4\xab",
404 /* 0xf0 */ "\xc4\x91", "\xc5\x86", "\xc5\x8d", "\xc4\xb7",
405 /* 0xf4 */ "\xc3\xb4", "\xc3\xb5", "\xc3\xb6", "\xc3\xb7",
406 /* 0xf8 */ "\xc3\xb8", "\xc5\xb3", "\xc3\xba", "\xc3\xbb",
407 /* 0xfc */ "\xc3\xbc", "\xc5\xa9", "\xc5\xab", "\xcb\x99"
409 /*--------------------------------------------------------------------------*/
410 /* CP1254 (ISO Latin-5) */
411 /* based on: */
412 /* ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT */
413 /*--------------------------------------------------------------------------*/
415 /* 0x00 */ "ISOLatin5", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
416 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
417 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
418 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
419 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
420 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
421 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
422 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
423 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
424 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
425 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
426 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
427 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
428 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
429 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
430 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
431 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
432 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
433 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
434 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
435 /* 0x80 */ "\xe2\x82\xac", REPLC_CHAR, "\xe2\x80\x9a", "\xc6\x92",
436 /* 0x84 */ "\xe2\x80\x9e", "\xe2\x80\xa6", "\xe2\x80\xa0", "\xe2\x80\xa1",
437 /* 0x88 */ "\xcb\x86", "\xe2\x80\xb0", "\xc5\xa0", "\xe2\x80\xb9",
438 /* 0x8c */ "\xc5\x92", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
439 /* 0x90 */ REPLC_CHAR, "\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c",
440 /* 0x94 */ "\xe2\x80\x9d", "\xe2\x80\xa2", "\xe2\x80\x93", "\xe2\x80\x94",
441 /* 0x98 */ "\xcb\x9c", "\xe2\x84\xa2", "\xc5\xa1", "\xe2\x80\xba",
442 /* 0x9c */ "\xc5\x93", REPLC_CHAR, REPLC_CHAR, "\xc5\xb8",
443 /* 0xa0 */ "\xc2\xa0", "\xc2\xa1", "\xc2\xa2", "\xc2\xa3",
444 /* 0xa4 */ "\xc2\xa4", "\xc2\xa5", "\xc2\xa6", "\xc2\xa7",
445 /* 0xa8 */ "\xc2\xa8", "\xc2\xa9", "\xc2\xaa", "\xc2\xab",
446 /* 0xac */ "\xc2\xac", "\xc2\xad", "\xc2\xae", "\xc2\xaf",
447 /* 0xb0 */ "\xc2\xb0", "\xc2\xb1", "\xc2\xb2", "\xc2\xb3",
448 /* 0xb4 */ "\xc2\xb4", "\xc2\xb5", "\xc2\xb6", "\xc2\xb7",
449 /* 0xb8 */ "\xc2\xb8", "\xc2\xb9", "\xc2\xba", "\xc2\xbb",
450 /* 0xbc */ "\xc2\xbc", "\xc2\xbd", "\xc2\xbe", "\xc2\xbf",
451 /* 0xc0 */ "\xc3\x80", "\xc3\x81", "\xc3\x82", "\xc3\x83",
452 /* 0xc4 */ "\xc3\x84", "\xc3\x85", "\xc3\x86", "\xc3\x87",
453 /* 0xc8 */ "\xc3\x88", "\xc3\x89", "\xc3\x8a", "\xc3\x8b",
454 /* 0xcc */ "\xc3\x8c", "\xc3\x8d", "\xc3\x8e", "\xc3\x8f",
455 /* 0xd0 */ "\xc4\x9e", "\xc3\x91", "\xc3\x92", "\xc3\x93",
456 /* 0xd4 */ "\xc3\x94", "\xc3\x95", "\xc3\x96", "\xc3\x97",
457 /* 0xd8 */ "\xc3\x98", "\xc3\x99", "\xc3\x9a", "\xc3\x9b",
458 /* 0xdc */ "\xc3\x9c", "\xc4\xb0", "\xc5\x9e", "\xc3\x9f",
459 /* 0xe0 */ "\xc3\xa0", "\xc3\xa1", "\xc3\xa2", "\xc3\xa3",
460 /* 0xe4 */ "\xc3\xa4", "\xc3\xa5", "\xc3\xa6", "\xc3\xa7",
461 /* 0xe8 */ "\xc3\xa8", "\xc3\xa9", "\xc3\xaa", "\xc3\xab",
462 /* 0xec */ "\xc3\xac", "\xc3\xad", "\xc3\xae", "\xc3\xaf",
463 /* 0xf0 */ "\xc4\x9f", "\xc3\xb1", "\xc3\xb2", "\xc3\xb3",
464 /* 0xf4 */ "\xc3\xb4", "\xc3\xb5", "\xc3\xb6", "\xc3\xb7",
465 /* 0xf8 */ "\xc3\xb8", "\xc3\xb9", "\xc3\xba", "\xc3\xbb",
466 /* 0xfc */ "\xc3\xbc", "\xc4\xb1", "\xc5\x9f", "\xc3\xbf"
468 /*--------------------------------------------------------------------------*/
469 /* iso 8859-6 */
470 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT */
471 /*--------------------------------------------------------------------------*/
473 /* 0x00 */ "ISOLatin6", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
474 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
475 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
476 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
477 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
478 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
479 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
480 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
481 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
482 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
483 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
484 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
485 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
486 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
487 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
488 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
489 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
490 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
491 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
492 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
493 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
494 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
495 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
496 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
497 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
498 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
499 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
500 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
501 /* 0xa0 */ "\xc2\xa0", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
502 /* 0xa4 */ "\xc2\xa4", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
503 /* 0xa8 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
504 /* 0xac */ "\xd8\x8c", "\xc2\xad", REPLC_CHAR, REPLC_CHAR,
505 /* 0xb0 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
506 /* 0xb4 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
507 /* 0xb8 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, "\xd8\x9b",
508 /* 0xbc */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, "\xd8\x9f",
509 /* 0xc0 */ REPLC_CHAR, "\xd8\xa1", "\xd8\xa2", "\xd8\xa3",
510 /* 0xc4 */ "\xd8\xa4", "\xd8\xa5", "\xd8\xa6", "\xd8\xa7",
511 /* 0xc8 */ "\xd8\xa8", "\xd8\xa9", "\xd8\xaa", "\xd8\xab",
512 /* 0xcc */ "\xd8\xac", "\xd8\xad", "\xd8\xae", "\xd8\xaf",
513 /* 0xd0 */ "\xd8\xb0", "\xd8\xb1", "\xd8\xb2", "\xd8\xb3",
514 /* 0xd4 */ "\xd8\xb4", "\xd8\xb5", "\xd8\xb6", "\xd8\xb7",
515 /* 0xd8 */ "\xd8\xb8", "\xd8\xb9", "\xd8\xba", REPLC_CHAR,
516 /* 0xdc */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
517 /* 0xe0 */ "\xd9\x80", "\xd9\x81", "\xd9\x82", "\xd9\x83",
518 /* 0xe4 */ "\xd9\x84", "\xd9\x85", "\xd9\x86", "\xd9\x87",
519 /* 0xe8 */ "\xd9\x88", "\xd9\x89", "\xd9\x8a", "\xd9\x8b",
520 /* 0xec */ "\xd9\x8c", "\xd9\x8d", "\xd9\x8e", "\xd9\x8f",
521 /* 0xf0 */ "\xd9\x90", "\xd9\x91", "\xd9\x92", REPLC_CHAR,
522 /* 0xf4 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
523 /* 0xf8 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
524 /* 0xfc */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR
526 /*--------------------------------------------------------------------------*/
527 /* iso 8859-5 */
528 /* based on: ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT */
529 /*--------------------------------------------------------------------------*/
531 /* 0x00 */ "ISO8859-5", REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
532 /* 0x04 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
533 /* 0x08 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
534 /* 0x0c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
535 /* 0x10 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
536 /* 0x14 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
537 /* 0x18 */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
538 /* 0x1c */ REPLC_CHAR, REPLC_CHAR, REPLC_CHAR, REPLC_CHAR,
539 /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'",
540 /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/",
541 /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7",
542 /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?",
543 /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G",
544 /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O",
545 /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W",
546 /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_",
547 /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g",
548 /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o",
549 /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w",
550 /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "\x7f",
551 /* 0x80 */ "\xc2\x80", "\xc2\x81", "\xc2\x82", "\xc2\x83",
552 /* 0x84 */ "\xc2\x84", "\xc2\x85", "\xc2\x86", "\xc2\x87",
553 /* 0x88 */ "\xc2\x88", "\xc2\x89", "\xc2\x8a", "\xc2\x8b",
554 /* 0x8c */ "\xc2\x8c", "\xc2\x8d", "\xc2\x8e", "\xc2\x8f",
555 /* 0x90 */ "\xc2\x90", "\xc2\x91", "\xc2\x92", "\xc2\x93",
556 /* 0x94 */ "\xc2\x94", "\xc2\x95", "\xc2\x96", "\xc2\x97",
557 /* 0x98 */ "\xc2\x98", "\xc2\x99", "\xc2\x9a", "\xc2\x9b",
558 /* 0x9c */ "\xc2\x9c", "\xc2\x9d", "\xc2\x9e", "\xc2\x9f",
559 /* 0xa0 */ "\xc2\xa0", "\xd0\x81", "\xd0\x82", "\xd0\x83",
560 /* 0xa4 */ "\xd0\x84", "\xd0\x85", "\xd0\x86", "\xd0\x87",
561 /* 0xa8 */ "\xd0\x88", "\xd0\x89", "\xd0\x8a", "\xd0\x8b",
562 /* 0xac */ "\xd0\x8c", "\xc2\xad", "\xd0\x8e", "\xd0\x8f",
563 /* 0xb0 */ "\xd0\x90", "\xd0\x91", "\xd0\x92", "\xd0\x93",
564 /* 0xb4 */ "\xd0\x94", "\xd0\x95", "\xd0\x96", "\xd0\x97",
565 /* 0xb8 */ "\xd0\x98", "\xd0\x99", "\xd0\x9a", "\xd0\x9b",
566 /* 0xbc */ "\xd0\x9c", "\xd0\x9d", "\xd0\x9e", "\xd0\x9f",
567 /* 0xc0 */ "\xd0\xa0", "\xd0\xa1", "\xd0\xa2", "\xd0\xa3",
568 /* 0xc4 */ "\xd0\xa4", "\xd0\xa5", "\xd0\xa6", "\xd0\xa7",
569 /* 0xc8 */ "\xd0\xa8", "\xd0\xa9", "\xd0\xaa", "\xd0\xab",
570 /* 0xcc */ "\xd0\xac", "\xd0\xad", "\xd0\xae", "\xd0\xaf",
571 /* 0xd0 */ "\xd0\xb0", "\xd0\xb1", "\xd0\xb2", "\xd0\xb3",
572 /* 0xd4 */ "\xd0\xb4", "\xd0\xb5", "\xd0\xb6", "\xd0\xb7",
573 /* 0xd8 */ "\xd0\xb8", "\xd0\xb9", "\xd0\xba", "\xd0\xbb",
574 /* 0xdc */ "\xd0\xbc", "\xd0\xbd", "\xd0\xbe", "\xd0\xbf",
575 /* 0xe0 */ "\xd1\x80", "\xd1\x81", "\xd1\x82", "\xd1\x83",
576 /* 0xe4 */ "\xd1\x84", "\xd1\x85", "\xd1\x86", "\xd1\x87",
577 /* 0xe8 */ "\xd1\x88", "\xd1\x89", "\xd1\x8a", "\xd1\x8b",
578 /* 0xec */ "\xd1\x8c", "\xd1\x8d", "\xd1\x8e", "\xd1\x8f",
579 /* 0xf0 */ "\xe2\x84\x96", "\xd1\x91", "\xd1\x92", "\xd1\x93",
580 /* 0xf4 */ "\xd1\x94", "\xd1\x95", "\xd1\x96", "\xd1\x97",
581 /* 0xf8 */ "\xd1\x98", "\xd1\x99", "\xd1\x9a", "\xd1\x9b",
582 /* 0xfc */ "\xd1\x9c", "\xc2\xa7", "\xd1\x9e", "\xd1\x9f"
585 /*--------------------------------------------------------------------------*/
586 /* Closing line should be NULL */
587 /*--------------------------------------------------------------------------*/
588 {(char*) 0}
592 /*----------------------------------------------------------------------*/
593 /* Routine to search for a UTF-8 code in the tables and return the */
594 /* associated 8-bit code (reverse lookup). */
595 /* */
596 /* Note that this routine does not check whether or not the encoding */
597 /* scheme containing the UTF-8 character code is the encoding */
598 /* currently in effect in a text string. */
599 /*----------------------------------------------------------------------*/
601 int utf8_reverse_lookup(char *utf8string)
603 int i, j;
604 char *s1, *s2;
606 for (i = 0; ; i++) {
607 if (utf8encodings[i][0] == NULL) break;
608 for (j = 0; j < 256; j++) {
609 s1 = (char *)utf8encodings[i][j];
610 s2 = utf8string;
611 while (*s1 == *s2) {
612 if (*s1 == '\0')
613 return j;
614 s1++;
615 s2++;
617 /* NOTE: Xutf8LookupString() results in strings longer than */
618 /* expected for the UTF-8 code. Not sure what they are, */
619 /* but the initial part matches the expected code. */
620 if ((*s1 == '\0') && (s2 > (utf8string + 1))) return j;
623 return -1;