1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sal.hxx"
26
27 #include "sal/config.h"
28
29 #include <cstddef>
30 #include <cstring>
31
32 #include "rtl/string.hxx"
33 #include "rtl/tencinfo.h"
34 #include "rtl/textcvt.h"
35 #include "rtl/textenc.h"
36 #include "sal/types.h"
37 #include "gtest/gtest.h"
38
39 namespace {
40
41 struct SingleByteCharSet {
42 rtl_TextEncoding m_nEncoding;
43 sal_Unicode m_aMap[256];
44 };
45
testSingleByteCharSet(SingleByteCharSet const & rSet)46 void testSingleByteCharSet(SingleByteCharSet const & rSet) {
47 sal_Char aText[256];
48 sal_Unicode aUnicode[256];
49 sal_Size nNumber = 0;
50 for (int i = 0; i < 256; ++i) {
51 if (rSet.m_aMap[i] != 0xFFFF) {
52 aText[nNumber++] = static_cast< sal_Char >(i);
53 }
54 }
55 {
56 rtl_TextToUnicodeConverter aConverter
57 = rtl_createTextToUnicodeConverter(rSet.m_nEncoding);
58 rtl_TextToUnicodeContext aContext
59 = rtl_createTextToUnicodeContext(aConverter);
60 ASSERT_TRUE(aConverter && aContext) << "failure #1";
61 sal_Size nSize;
62 sal_uInt32 nInfo;
63 sal_Size nConverted;
64 nSize = rtl_convertTextToUnicode(
65 aConverter, aContext, aText, nNumber, aUnicode, nNumber,
66 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
67 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
68 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
69 &nInfo, &nConverted);
70 ASSERT_TRUE(nSize == nNumber && nInfo == 0 && nConverted == nNumber) << "failure #2";
71 rtl_destroyTextToUnicodeContext(aConverter, aContext);
72 rtl_destroyTextToUnicodeConverter(aConverter);
73 }
74 {
75 bool bSuccess = true;
76 int j = 0;
77 for (int i = 0; i < 256; ++i) {
78 if (rSet.m_aMap[i] != 0xFFFF && aUnicode[j++] != rSet.m_aMap[i]) {
79 bSuccess = false;
80 break;
81 }
82 }
83 ASSERT_TRUE(bSuccess) << "failure #3";
84 }
85 if (rSet.m_nEncoding == RTL_TEXTENCODING_ASCII_US) {
86 nNumber = 128;
87 }
88 {
89 rtl_UnicodeToTextConverter aConverter
90 = rtl_createUnicodeToTextConverter(rSet.m_nEncoding);
91 rtl_UnicodeToTextContext aContext
92 = rtl_createUnicodeToTextContext(aConverter);
93 ASSERT_TRUE(aConverter && aContext) << "failure #4";
94 sal_Size nSize;
95 sal_uInt32 nInfo;
96 sal_Size nConverted;
97 nSize = rtl_convertUnicodeToText(
98 aConverter, aContext, aUnicode, nNumber, aText, nNumber,
99 (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
100 | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR),
101 &nInfo, &nConverted);
102 ASSERT_TRUE(nSize == nNumber && nInfo == 0 && nConverted == nNumber) << "failure #5";
103 rtl_destroyUnicodeToTextContext(aConverter, aContext);
104 rtl_destroyUnicodeToTextConverter(aConverter);
105 }
106 {
107 bool bSuccess = true;
108 int j = 0;
109 for (int i = 0; i < 256; ++i) {
110 if (rSet.m_aMap[i] != 0xFFFF
111 && aText[j++] != static_cast< sal_Char >(i))
112 {
113 bSuccess = false;
114 break;
115 }
116 }
117 ASSERT_TRUE(bSuccess) << "failure #6";
118 }
119 for (int i = 0; i < 256; ++i) {
120 if (rSet.m_aMap[i] == 0xFFFF) {
121 aText[0] = static_cast< sal_Char >(i);
122 rtl_TextToUnicodeConverter aConverter
123 = rtl_createTextToUnicodeConverter(rSet.m_nEncoding);
124 rtl_TextToUnicodeContext aContext
125 = rtl_createTextToUnicodeContext(aConverter);
126 ASSERT_TRUE(aConverter && aContext) << "failure #7";
127 sal_Size nSize;
128 sal_uInt32 nInfo;
129 sal_Size nConverted;
130 nSize = rtl_convertTextToUnicode(
131 aConverter, aContext, aText, 1, aUnicode, 1,
132 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
133 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
134 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
135 &nInfo, &nConverted);
136 ASSERT_TRUE((nSize == 0
137 && (nInfo
138 == (RTL_TEXTTOUNICODE_INFO_ERROR
139 | RTL_TEXTTOUNICODE_INFO_UNDEFINED))
140 && nConverted == 0)) << "failure #9";
141 rtl_destroyTextToUnicodeContext(aConverter, aContext);
142 rtl_destroyTextToUnicodeConverter(aConverter);
143 }
144 }
145 }
146
147 int const TEST_STRING_SIZE = 1000;
148
149 struct ComplexCharSetTest {
150 rtl_TextEncoding m_nEncoding;
151 char const * m_pText;
152 sal_Size m_nTextSize;
153 sal_Unicode m_aUnicode[TEST_STRING_SIZE];
154 sal_Size m_nUnicodeSize;
155 bool m_bNoContext;
156 bool m_bForward;
157 bool m_bReverse;
158 bool m_bGlobalSignature;
159 sal_uInt32 m_nReverseUndefined;
160 };
161
doComplexCharSetTest(ComplexCharSetTest const & rTest)162 void doComplexCharSetTest(ComplexCharSetTest const & rTest) {
163 if (rTest.m_bForward) {
164 sal_Unicode aUnicode[TEST_STRING_SIZE];
165 rtl_TextToUnicodeConverter aConverter
166 = rtl_createTextToUnicodeConverter(rTest.m_nEncoding);
167 rtl_TextToUnicodeContext aContext
168 = rtl_createTextToUnicodeContext(aConverter);
169 ASSERT_TRUE(aConverter && aContext) << "failure #10";
170 sal_Size nSize;
171 sal_uInt32 nInfo;
172 sal_Size nConverted;
173 nSize = rtl_convertTextToUnicode(
174 aConverter, aContext,
175 reinterpret_cast< sal_Char const * >(rTest.m_pText),
176 rTest.m_nTextSize, aUnicode, TEST_STRING_SIZE,
177 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
178 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
179 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
180 | RTL_TEXTTOUNICODE_FLAGS_FLUSH
181 | (rTest.m_bGlobalSignature ?
182 RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE : 0)),
183 &nInfo, &nConverted);
184 ASSERT_TRUE((nSize == rTest.m_nUnicodeSize && nInfo == 0
185 && nConverted == rTest.m_nTextSize)) << "failure #11";
186 rtl_destroyTextToUnicodeContext(aConverter, aContext);
187 rtl_destroyTextToUnicodeConverter(aConverter);
188 bool bSuccess = true;
189 for (sal_Size i = 0; i < rTest.m_nUnicodeSize; ++i) {
190 if (aUnicode[i] != rTest.m_aUnicode[i]) {
191 bSuccess = false;
192 break;
193 }
194 }
195 ASSERT_TRUE(bSuccess) << "failure #12";
196 }
197 if (rTest.m_bForward) {
198 sal_Unicode aUnicode[TEST_STRING_SIZE];
199 rtl_TextToUnicodeConverter aConverter
200 = rtl_createTextToUnicodeConverter(rTest.m_nEncoding);
201 rtl_TextToUnicodeContext aContext
202 = rtl_createTextToUnicodeContext(aConverter);
203 ASSERT_TRUE(aConverter && aContext) << "failure #13";
204 if (aContext != (rtl_TextToUnicodeContext) 1) {
205 sal_Size nInput = 0;
206 sal_Size nOutput = 0;
207 for (bool bFlush = true; nInput < rTest.m_nTextSize || bFlush;) {
208 sal_Size nSrcBytes = 1;
209 sal_uInt32 nFlags
210 = (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
211 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
212 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
213 | (rTest.m_bGlobalSignature ?
214 RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE : 0));
215 if (nInput >= rTest.m_nTextSize) {
216 nSrcBytes = 0;
217 nFlags |= RTL_TEXTTOUNICODE_FLAGS_FLUSH;
218 bFlush = false;
219 }
220 sal_uInt32 nInfo;
221 sal_Size nConverted;
222 sal_Size nSize = rtl_convertTextToUnicode(
223 aConverter, aContext,
224 reinterpret_cast< sal_Char const * >(rTest.m_pText + nInput),
225 nSrcBytes, aUnicode + nOutput, TEST_STRING_SIZE - nOutput,
226 nFlags, &nInfo, &nConverted);
227 nOutput += nSize;
228 nInput += nConverted;
229 ASSERT_TRUE((nInfo & ~RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) == 0) << "failure #14";
230 }
231 ASSERT_TRUE(nOutput == rTest.m_nUnicodeSize && nInput == rTest.m_nTextSize) << "failure #15";
232 bool bSuccess = true;
233 for (sal_Size i = 0; i < rTest.m_nUnicodeSize; ++i) {
234 if (aUnicode[i] != rTest.m_aUnicode[i]) {
235 bSuccess = false;
236 break;
237 }
238 }
239 ASSERT_TRUE(bSuccess) << "failure #16";
240 }
241 rtl_destroyTextToUnicodeContext(aConverter, aContext);
242 rtl_destroyTextToUnicodeConverter(aConverter);
243 }
244 if (rTest.m_bNoContext && rTest.m_bForward) {
245 sal_Unicode aUnicode[TEST_STRING_SIZE];
246 int nSize = 0;
247 rtl_TextToUnicodeConverter aConverter
248 = rtl_createTextToUnicodeConverter(rTest.m_nEncoding);
249 ASSERT_TRUE(aConverter) << "failure #17";
250 for (sal_Size i = 0;;) {
251 if (i == rTest.m_nTextSize) {
252 goto done;
253 }
254 sal_Char c1 = rTest.m_pText[i++];
255 sal_Unicode aUC[2];
256 sal_uInt32 nInfo = 0;
257 sal_Size nCvtBytes;
258 sal_Size nChars = rtl_convertTextToUnicode(
259 aConverter, 0, &c1, 1, aUC, 2,
260 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
261 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
262 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
263 | (rTest.m_bGlobalSignature ?
264 RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE : 0)),
265 &nInfo, &nCvtBytes);
266 if ((nInfo & RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0) {
267 sal_Char sBuffer[10];
268 sBuffer[0] = c1;
269 sal_uInt16 nLen = 1;
270 while ((nInfo & RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) != 0
271 && nLen < 10)
272 {
273 if (i == rTest.m_nTextSize) {
274 goto done;
275 }
276 c1 = rTest.m_pText[i++];
277 sBuffer[nLen++] = c1;
278 nChars = rtl_convertTextToUnicode(
279 aConverter, 0, sBuffer, nLen, aUC, 2,
280 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
281 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
282 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
283 | (rTest.m_bGlobalSignature ?
284 RTL_TEXTTOUNICODE_FLAGS_GLOBAL_SIGNATURE : 0)),
285 &nInfo, &nCvtBytes);
286 }
287 if (nChars == 1 && nInfo == 0) {
288 OSL_ASSERT(nCvtBytes == nLen);
289 aUnicode[nSize++] = aUC[0];
290 } else if (nChars == 2 && nInfo == 0) {
291 OSL_ASSERT(nCvtBytes == nLen);
292 aUnicode[nSize++] = aUC[0];
293 aUnicode[nSize++] = aUC[1];
294 } else {
295 OSL_ASSERT(
296 (nInfo & RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL) == 0
297 && nChars == 0 && nInfo != 0);
298 aUnicode[nSize++] = sBuffer[0];
299 i -= nLen - 1;
300 }
301 } else if (nChars == 1 && nInfo == 0) {
302 OSL_ASSERT(nCvtBytes == 1);
303 aUnicode[nSize++] = aUC[0];
304 } else if (nChars == 2 && nInfo == 0) {
305 OSL_ASSERT(nCvtBytes == 1);
306 aUnicode[nSize++] = aUC[0];
307 aUnicode[nSize++] = aUC[1];
308 } else {
309 OSL_ASSERT(nChars == 0 && nInfo != 0);
310 aUnicode[nSize++] = c1;
311 }
312 }
313 done:
314 rtl_destroyTextToUnicodeConverter(aConverter);
315 bool bSuccess = true;
316 for (sal_Size i = 0; i < rTest.m_nUnicodeSize; ++i) {
317 if (aUnicode[i] != rTest.m_aUnicode[i]) {
318 bSuccess = false;
319 break;
320 }
321 }
322 ASSERT_TRUE(bSuccess) << "failure #18";
323 }
324 if (rTest.m_bReverse) {
325 sal_Char aText[TEST_STRING_SIZE];
326 rtl_UnicodeToTextConverter aConverter
327 = rtl_createUnicodeToTextConverter(rTest.m_nEncoding);
328 rtl_UnicodeToTextContext aContext
329 = rtl_createUnicodeToTextContext(aConverter);
330 ASSERT_TRUE(aConverter && aContext) << "failure #19";
331 sal_Size nSize;
332 sal_uInt32 nInfo;
333 sal_Size nConverted;
334 nSize = rtl_convertUnicodeToText(
335 aConverter, aContext, rTest.m_aUnicode, rTest.m_nUnicodeSize, aText,
336 TEST_STRING_SIZE,
337 (rTest.m_nReverseUndefined | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR
338 | RTL_UNICODETOTEXT_FLAGS_FLUSH
339 | (rTest.m_bGlobalSignature ?
340 RTL_UNICODETOTEXT_FLAGS_GLOBAL_SIGNATURE : 0)),
341 &nInfo, &nConverted);
342 ASSERT_TRUE((nSize == rTest.m_nTextSize
343 && (nInfo == 0
344 || (nInfo == RTL_UNICODETOTEXT_INFO_UNDEFINED
345 && (rTest.m_nReverseUndefined
346 != RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR)))
347 && nConverted == rTest.m_nUnicodeSize)) << "failure #20";
348 rtl_destroyUnicodeToTextContext(aConverter, aContext);
349 rtl_destroyUnicodeToTextConverter(aConverter);
350 bool bSuccess = true;
351 for (sal_Size i = 0; i < rTest.m_nTextSize; ++i) {
352 if (aText[i] != rTest.m_pText[i]) {
353 bSuccess = false;
354 break;
355 }
356 }
357 ASSERT_TRUE(bSuccess) << "failure #21";
358 }
359 }
360
doComplexCharSetCutTest(ComplexCharSetTest const & rTest)361 void doComplexCharSetCutTest(ComplexCharSetTest const & rTest) {
362 if (rTest.m_bNoContext) {
363 sal_Unicode aUnicode[TEST_STRING_SIZE];
364 rtl_TextToUnicodeConverter aConverter
365 = rtl_createTextToUnicodeConverter(rTest.m_nEncoding);
366 ASSERT_TRUE(aConverter) << "failure #22";
367 sal_Size nSize;
368 sal_uInt32 nInfo;
369 sal_Size nConverted;
370 nSize = rtl_convertTextToUnicode(
371 aConverter, 0, reinterpret_cast< sal_Char const * >(rTest.m_pText),
372 rTest.m_nTextSize, aUnicode, TEST_STRING_SIZE,
373 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
374 | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
375 | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
376 &nInfo, &nConverted);
377 ASSERT_TRUE((nSize <= rTest.m_nUnicodeSize
378 && (nInfo == RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL
379 || (nInfo
380 == (RTL_TEXTTOUNICODE_INFO_ERROR
381 | RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL)))
382 && nConverted < rTest.m_nTextSize)) << "failure #23";
383 rtl_destroyTextToUnicodeConverter(aConverter);
384 bool bSuccess = true;
385 for (sal_Size i = 0; i < nSize; ++i) {
386 if (aUnicode[i] != rTest.m_aUnicode[i]) {
387 bSuccess = false;
388 break;
389 }
390 }
391 ASSERT_TRUE(bSuccess) << "failure #24";
392 }
393 }
394
395 class Test: public ::testing::Test {
396 public:
397 };
398
TEST_F(Test,testSingleByte)399 TEST_F(Test, testSingleByte) {
400 static SingleByteCharSet const data[]
401 = { { RTL_TEXTENCODING_MS_1250,
402 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
403 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
404 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
405 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
406 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
407 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
408 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
409 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
410 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
411 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
412 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
413 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
414 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
415 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
416 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
417 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
418 0x20AC,0xFFFF,0x201A,0xFFFF,0x201E,0x2026,0x2020,0x2021,
419 0xFFFF,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
420 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
421 0xFFFF,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
422 0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
423 0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
424 0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
425 0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
426 0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
427 0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
428 0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
429 0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
430 0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
431 0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
432 0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
433 0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 } },
434 { RTL_TEXTENCODING_MS_1251,
435 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
436 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
437 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
438 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
439 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
440 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
441 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
442 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
443 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
444 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
445 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
446 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
447 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
448 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
449 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
450 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
451 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
452 0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
453 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
454 0xFFFF,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
455 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
456 0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
457 0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
458 0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
459 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
460 0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
461 0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
462 0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
463 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
464 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
465 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
466 0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F } },
467 { RTL_TEXTENCODING_MS_1252,
468 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
469 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
470 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
471 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
472 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
473 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
474 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
475 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
476 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
477 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
478 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
479 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
480 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
481 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
482 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
483 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
484 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
485 0x02C6,0x2030,0x0160,0x2039,0x0152,0xFFFF,0x017D,0xFFFF,
486 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
487 0x02DC,0x2122,0x0161,0x203A,0x0153,0xFFFF,0x017E,0x0178,
488 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
489 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
490 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
491 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
492 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
493 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
494 0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
495 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
496 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
497 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
498 0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
499 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF } },
500 { RTL_TEXTENCODING_MS_1253,
501 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
502 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
503 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
504 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
505 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
506 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
507 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
508 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
509 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
510 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
511 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
512 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
513 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
514 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
515 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
516 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
517 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
518 0xFFFF,0x2030,0xFFFF,0x2039,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
519 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
520 0xFFFF,0x2122,0xFFFF,0x203A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
521 0x00A0,0x0385,0x0386,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
522 0x00A8,0x00A9,0xFFFF,0x00AB,0x00AC,0x00AD,0x00AE,0x2015,
523 0x00B0,0x00B1,0x00B2,0x00B3,0x0384,0x00B5,0x00B6,0x00B7,
524 0x0388,0x0389,0x038A,0x00BB,0x038C,0x00BD,0x038E,0x038F,
525 0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,
526 0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
527 0x03A0,0x03A1,0xFFFF,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,
528 0x03A8,0x03A9,0x03AA,0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,
529 0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,
530 0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,
531 0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,
532 0x03C8,0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0xFFFF } },
533 { RTL_TEXTENCODING_MS_1254,
534 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
535 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
536 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
537 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
538 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
539 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
540 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
541 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
542 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
543 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
544 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
545 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
546 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
547 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
548 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
549 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
550 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
551 0x02C6,0x2030,0x0160,0x2039,0x0152,0xFFFF,0xFFFF,0xFFFF,
552 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
553 0x02DC,0x2122,0x0161,0x203A,0x0153,0xFFFF,0xFFFF,0x0178,
554 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
555 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
556 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
557 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
558 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
559 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
560 0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
561 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF,
562 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
563 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
564 0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
565 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF } },
566 { RTL_TEXTENCODING_APPLE_ROMAN,
567 { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
568 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
569 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
570 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
571 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
572 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
573 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
574 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
575 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
576 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
577 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
578 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
579 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
580 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
581 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
582 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0x7F,
583 0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1,
584 0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8,
585 0x00EA,0x00EB,0x00ED,0x00EC,0x00EE,0x00EF,0x00F1,0x00F3,
586 0x00F2,0x00F4,0x00F6,0x00F5,0x00FA,0x00F9,0x00FB,0x00FC,
587 0x2020,0x00B0,0x00A2,0x00A3,0x00A7,0x2022,0x00B6,0x00DF,
588 0x00AE,0x00A9,0x2122,0x00B4,0x00A8,0x2260,0x00C6,0x00D8,
589 0x221E,0x00B1,0x2264,0x2265,0x00A5,0x00B5,0x2202,0x2211,
590 0x220F,0x03C0,0x222B,0x00AA,0x00BA,0x03A9,0x00E6,0x00F8,
591 0x00BF,0x00A1,0x00AC,0x221A,0x0192,0x2248,0x2206,0x00AB,
592 0x00BB,0x2026,0x00A0,0x00C0,0x00C3,0x00D5,0x0152,0x0153,
593 0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA,
594 0x00FF,0x0178,0x2044,0x20AC,0x2039,0x203A,0xFB01,0xFB02,
595 0x2021,0x00B7,0x201A,0x201E,0x2030,0x00C2,0x00CA,0x00C1,
596 0x00CB,0x00C8,0x00CD,0x00CE,0x00CF,0x00CC,0x00D3,0x00D4,
597 0xF8FF,0x00D2,0x00DA,0x00DB,0x00D9,0x0131,0x02C6,0x02DC,
598 0x00AF,0x02D8,0x02D9,0x02DA,0x00B8,0x02DD,0x02DB,0x02C7 } },
599 { RTL_TEXTENCODING_IBM_437,
600 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
601 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
602 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
603 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
604 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
605 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
606 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
607 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
608 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
609 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
610 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
611 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
612 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
613 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
614 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
615 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
616 0x00c7,0x00fc,0x00e9,0x00e2,0x00e4,0x00e0,0x00e5,0x00e7,
617 0x00ea,0x00eb,0x00e8,0x00ef,0x00ee,0x00ec,0x00c4,0x00c5,
618 0x00c9,0x00e6,0x00c6,0x00f4,0x00f6,0x00f2,0x00fb,0x00f9,
619 0x00ff,0x00d6,0x00dc,0x00a2,0x00a3,0x00a5,0x20a7,0x0192,
620 0x00e1,0x00ed,0x00f3,0x00fa,0x00f1,0x00d1,0x00aa,0x00ba,
621 0x00bf,0x2310,0x00ac,0x00bd,0x00bc,0x00a1,0x00ab,0x00bb,
622 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,
623 0x2555,0x2563,0x2551,0x2557,0x255d,0x255c,0x255b,0x2510,
624 0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x255e,0x255f,
625 0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x2567,
626 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256b,
627 0x256a,0x2518,0x250c,0x2588,0x2584,0x258c,0x2590,0x2580,
628 0x03b1,0x00df,0x0393,0x03c0,0x03a3,0x03c3,0x00b5,0x03c4,
629 0x03a6,0x0398,0x03a9,0x03b4,0x221e,0x03c6,0x03b5,0x2229,
630 0x2261,0x00b1,0x2265,0x2264,0x2320,0x2321,0x00f7,0x2248,
631 0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x00a0 } },
632 // ...
633 { RTL_TEXTENCODING_ASCII_US,
634 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
635 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
636 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
637 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
638 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
639 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
640 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
641 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
642 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
643 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
644 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
645 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
646 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
647 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
648 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
649 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
650 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021, // !
651 0x02C6,0x2030,0x0160,0x2039,0x0152,0xFFFF,0x017D,0xFFFF, // !
652 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, // !
653 0x02DC,0x2122,0x0161,0x203A,0x0153,0xFFFF,0x017E,0x0178, // !
654 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7,
655 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF,
656 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
657 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF,
658 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
659 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF,
660 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
661 0xD8, 0xD9, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF,
662 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
663 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
664 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
665 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF } },
666 { RTL_TEXTENCODING_ISO_8859_1,
667 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
668 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
669 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
670 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
671 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
672 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
673 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
674 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
675 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
676 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
677 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
678 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
679 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
680 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
681 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
682 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
683 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
684 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
685 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
686 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
687 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
688 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
689 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
690 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
691 0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
692 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
693 0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
694 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
695 0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
696 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
697 0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
698 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF } },
699 { RTL_TEXTENCODING_ISO_8859_2,
700 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
701 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
702 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
703 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
704 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
705 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
706 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
707 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
708 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
709 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
710 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
711 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
712 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
713 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
714 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
715 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
716 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
717 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
718 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
719 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
720 0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
721 0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
722 0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
723 0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
724 0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
725 0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
726 0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
727 0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
728 0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
729 0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
730 0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
731 0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 } },
732 { RTL_TEXTENCODING_ISO_8859_3,
733 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
734 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
735 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
736 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
737 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
738 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
739 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
740 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
741 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
742 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
743 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
744 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
745 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
746 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
747 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
748 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
749 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
750 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
751 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
752 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
753 0x00A0,0x0126,0x02D8,0x00A3,0x00A4,0xFFFF,0x0124,0x00A7,
754 0x00A8,0x0130,0x015E,0x011E,0x0134,0x00AD,0xFFFF,0x017B,
755 0x00B0,0x0127,0x00B2,0x00B3,0x00B4,0x00B5,0x0125,0x00B7,
756 0x00B8,0x0131,0x015F,0x011F,0x0135,0x00BD,0xFFFF,0x017C,
757 0x00C0,0x00C1,0x00C2,0xFFFF,0x00C4,0x010A,0x0108,0x00C7,
758 0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
759 0xFFFF,0x00D1,0x00D2,0x00D3,0x00D4,0x0120,0x00D6,0x00D7,
760 0x011C,0x00D9,0x00DA,0x00DB,0x00DC,0x016C,0x015C,0x00DF,
761 0x00E0,0x00E1,0x00E2,0xFFFF,0x00E4,0x010B,0x0109,0x00E7,
762 0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
763 0xFFFF,0x00F1,0x00F2,0x00F3,0x00F4,0x0121,0x00F6,0x00F7,
764 0x011D,0x00F9,0x00FA,0x00FB,0x00FC,0x016D,0x015D,0x02D9 } },
765 // ...
766 { RTL_TEXTENCODING_ISO_8859_6,
767 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
768 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
769 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
770 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
771 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
772 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
773 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
774 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
775 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
776 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
777 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
778 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
779 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
780 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
781 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
782 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
783 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
784 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
785 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
786 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
787 0x00A0,0xFFFF,0xFFFF,0xFFFF,0x00A4,0xFFFF,0xFFFF,0xFFFF,
788 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x060C,0x00AD,0xFFFF,0xFFFF,
789 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
790 0xFFFF,0xFFFF,0xFFFF,0x061B,0xFFFF,0xFFFF,0xFFFF,0x061F,
791 0xFFFF,0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,
792 0x0628,0x0629,0x062A,0x062B,0x062C,0x062D,0x062E,0x062F,
793 0x0630,0x0631,0x0632,0x0633,0x0634,0x0635,0x0636,0x0637,
794 0x0638,0x0639,0x063A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
795 0x0640,0x0641,0x0642,0x0643,0x0644,0x0645,0x0646,0x0647,
796 0x0648,0x0649,0x064A,0x064B,0x064C,0x064D,0x064E,0x064F,
797 0x0650,0x0651,0x0652,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
798 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
799 // ...
800 { RTL_TEXTENCODING_ISO_8859_8,
801 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
802 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
803 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
804 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
805 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
806 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
807 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
808 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
809 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
810 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
811 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
812 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
813 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
814 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
815 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
816 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
817 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
818 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
819 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
820 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
821 0x00A0,0xFFFF,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
822 0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
823 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
824 0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0xFFFF,
825 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
826 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
827 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
828 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x2017,
829 0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
830 0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
831 0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
832 0x05E8,0x05E9,0x05EA,0xFFFF,0xFFFF,0x200E,0x200F,0xFFFF } },
833 // ...
834 { RTL_TEXTENCODING_TIS_620,
835 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
836 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
837 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
838 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
839 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
840 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
841 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
842 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
843 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
844 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
845 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
846 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
847 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
848 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
849 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
850 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
851 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
852 0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
853 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
854 0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
855 0x00A0,0x0E01,0x0E02,0x0E03,0x0E04,0x0E05,0x0E06,0x0E07, // !
856 0x0E08,0x0E09,0x0E0A,0x0E0B,0x0E0C,0x0E0D,0x0E0E,0x0E0F,
857 0x0E10,0x0E11,0x0E12,0x0E13,0x0E14,0x0E15,0x0E16,0x0E17,
858 0x0E18,0x0E19,0x0E1A,0x0E1B,0x0E1C,0x0E1D,0x0E1E,0x0E1F,
859 0x0E20,0x0E21,0x0E22,0x0E23,0x0E24,0x0E25,0x0E26,0x0E27,
860 0x0E28,0x0E29,0x0E2A,0x0E2B,0x0E2C,0x0E2D,0x0E2E,0x0E2F,
861 0x0E30,0x0E31,0x0E32,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37,
862 0x0E38,0x0E39,0x0E3A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x0E3F,
863 0x0E40,0x0E41,0x0E42,0x0E43,0x0E44,0x0E45,0x0E46,0x0E47,
864 0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D,0x0E4E,0x0E4F,
865 0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57,
866 0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
867 { RTL_TEXTENCODING_MS_874,
868 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
869 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
870 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
871 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
872 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
873 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
874 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
875 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
876 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
877 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
878 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
879 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
880 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
881 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
882 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
883 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
884 0x20AC,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x2026,0xFFFF,0xFFFF,
885 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
886 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
887 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
888 0x00A0,0x0E01,0x0E02,0x0E03,0x0E04,0x0E05,0x0E06,0x0E07,
889 0x0E08,0x0E09,0x0E0A,0x0E0B,0x0E0C,0x0E0D,0x0E0E,0x0E0F,
890 0x0E10,0x0E11,0x0E12,0x0E13,0x0E14,0x0E15,0x0E16,0x0E17,
891 0x0E18,0x0E19,0x0E1A,0x0E1B,0x0E1C,0x0E1D,0x0E1E,0x0E1F,
892 0x0E20,0x0E21,0x0E22,0x0E23,0x0E24,0x0E25,0x0E26,0x0E27,
893 0x0E28,0x0E29,0x0E2A,0x0E2B,0x0E2C,0x0E2D,0x0E2E,0x0E2F,
894 0x0E30,0x0E31,0x0E32,0x0E33,0x0E34,0x0E35,0x0E36,0x0E37,
895 0x0E38,0x0E39,0x0E3A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x0E3F,
896 0x0E40,0x0E41,0x0E42,0x0E43,0x0E44,0x0E45,0x0E46,0x0E47,
897 0x0E48,0x0E49,0x0E4A,0x0E4B,0x0E4C,0x0E4D,0x0E4E,0x0E4F,
898 0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57,
899 0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
900 { RTL_TEXTENCODING_MS_1255,
901 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
902 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
903 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
904 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
905 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
906 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
907 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
908 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
909 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
910 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
911 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
912 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
913 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
914 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
915 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
916 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
917 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
918 0x02C6,0x2030,0xFFFF,0x2039,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
919 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
920 0x02DC,0x2122,0xFFFF,0x203A,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
921 0x00A0,0x00A1,0x00A2,0x00A3,0x20AA,0x00A5,0x00A6,0x00A7,
922 0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
923 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
924 0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
925 0x05B0,0x05B1,0x05B2,0x05B3,0x05B4,0x05B5,0x05B6,0x05B7,
926 0x05B8,0x05B9,0xFFFF,0x05BB,0x05BC,0x05BD,0x05BE,0x05BF,
927 0x05C0,0x05C1,0x05C2,0x05C3,0x05F0,0x05F1,0x05F2,0x05F3,
928 0x05F4,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
929 0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
930 0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
931 0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
932 0x05E8,0x05E9,0x05EA,0xFFFF,0xFFFF,0x200E,0x200F,0xFFFF } },
933 { RTL_TEXTENCODING_MS_1256,
934 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
935 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
936 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
937 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
938 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
939 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
940 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
941 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
942 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
943 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
944 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
945 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
946 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
947 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
948 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
949 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
950 0x20AC,0x067E,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
951 0x02C6,0x2030,0x0679,0x2039,0x0152,0x0686,0x0698,0x0688,
952 0x06AF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
953 0x06A9,0x2122,0x0691,0x203A,0x0153,0x200C,0x200D,0x06BA,
954 0x00A0,0x060C,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
955 0x00A8,0x00A9,0x06BE,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
956 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
957 0x00B8,0x00B9,0x061B,0x00BB,0x00BC,0x00BD,0x00BE,0x061F,
958 0x06C1,0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,
959 0x0628,0x0629,0x062A,0x062B,0x062C,0x062D,0x062E,0x062F,
960 0x0630,0x0631,0x0632,0x0633,0x0634,0x0635,0x0636,0x00D7,
961 0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
962 0x00E0,0x0644,0x00E2,0x0645,0x0646,0x0647,0x0648,0x00E7,
963 0x00E8,0x00E9,0x00EA,0x00EB,0x0649,0x064A,0x00EE,0x00EF,
964 0x064B,0x064C,0x064D,0x064E,0x00F4,0x064F,0x0650,0x00F7,
965 0x0651,0x00F9,0x0652,0x00FB,0x00FC,0x200E,0x200F,0x06D2 } },
966 { RTL_TEXTENCODING_MS_1257,
967 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
968 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
969 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
970 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
971 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
972 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
973 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
974 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
975 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
976 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
977 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
978 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
979 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
980 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
981 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
982 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
983 0x20AC,0xFFFF,0x201A,0xFFFF,0x201E,0x2026,0x2020,0x2021,
984 0xFFFF,0x2030,0xFFFF,0x2039,0xFFFF,0x00A8,0x02C7,0x00B8,
985 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
986 0xFFFF,0x2122,0xFFFF,0x203A,0xFFFF,0x00AF,0x02DB,0xFFFF,
987 0x00A0,0xFFFF,0x00A2,0x00A3,0x00A4,0xFFFF,0x00A6,0x00A7,
988 0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
989 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
990 0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
991 0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
992 0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
993 0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
994 0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
995 0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
996 0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
997 0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
998 0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9 } },
999 { RTL_TEXTENCODING_MS_1258,
1000 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
1001 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
1002 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
1003 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
1004 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
1005 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
1006 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1007 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1008 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
1009 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
1010 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
1011 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
1012 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
1013 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
1014 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
1015 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
1016 0x20AC,0xFFFF,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
1017 0x02C6,0x2030,0xFFFF,0x2039,0x0152,0xFFFF,0xFFFF,0xFFFF,
1018 0xFFFF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
1019 0x02DC,0x2122,0xFFFF,0x203A,0x0153,0xFFFF,0xFFFF,0x0178,
1020 0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
1021 0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
1022 0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
1023 0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
1024 0x00C0,0x00C1,0x00C2,0x0102,0x00C4,0x00C5,0x00C6,0x00C7,
1025 0x00C8,0x00C9,0x00CA,0x00CB,0x0300,0x00CD,0x00CE,0x00CF,
1026 0x0110,0x00D1,0x0309,0x00D3,0x00D4,0x01A0,0x00D6,0x00D7,
1027 0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x01AF,0x0303,0x00DF,
1028 0x00E0,0x00E1,0x00E2,0x0103,0x00E4,0x00E5,0x00E6,0x00E7,
1029 0x00E8,0x00E9,0x00EA,0x00EB,0x0301,0x00ED,0x00EE,0x00EF,
1030 0x0111,0x00F1,0x0323,0x00F3,0x00F4,0x01A1,0x00F6,0x00F7,
1031 0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x01B0,0x20AB,0x00FF } },
1032 { RTL_TEXTENCODING_KOI8_U, // RFC 2319
1033 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
1034 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
1035 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
1036 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
1037 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
1038 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
1039 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1040 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1041 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
1042 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
1043 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
1044 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
1045 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
1046 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
1047 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
1048 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
1049 0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
1050 0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
1051 0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248,
1052 0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
1053 0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457,
1054 0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E,
1055 0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407,
1056 0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9,
1057 0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
1058 0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
1059 0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
1060 0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
1061 0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
1062 0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
1063 0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
1064 0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A } },
1065 { RTL_TEXTENCODING_ISCII_DEVANAGARI,
1066 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
1067 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
1068 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
1069 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
1070 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
1071 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
1072 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1073 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1074 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
1075 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
1076 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
1077 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
1078 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
1079 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
1080 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
1081 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
1082 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1083 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1084 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1085 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1086 0xFFFF,0x0901,0x0902,0x0903,0x0905,0x0906,0x0907,0x0908,
1087 0x0909,0x090A,0x090B,0x090E,0x090F,0x0910,0x090D,0x0912,
1088 0x0913,0x0914,0x0911,0x0915,0x0916,0x0917,0x0918,0x0919,
1089 0x091A,0x091B,0x091C,0x091D,0x091E,0x091F,0x0920,0x0921,
1090 0x0922,0x0923,0x0924,0x0925,0x0926,0x0927,0x0928,0x0929,
1091 0x092A,0x092B,0x092C,0x092D,0x092E,0x092F,0x095F,0x0930,
1092 0x0931,0x0932,0x0933,0x0934,0x0935,0x0936,0x0937,0x0938,
1093 0x0939,0xFFFF,0x093E,0x093F,0x0940,0x0941,0x0942,0x0943,
1094 0x0946,0x0947,0x0948,0x0945,0x094A,0x094B,0x094C,0x0949,
1095 0x094D,0x093C,0x0964,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1096 0xFFFF,0x0966,0x0967,0x0968,0x0969,0x096A,0x096B,0x096C,
1097 0x096D,0x096E,0x096F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
1098 { RTL_TEXTENCODING_ADOBE_STANDARD,
1099 { 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1100 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1101 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1102 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1103 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x2019,
1104 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
1105 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1106 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1107 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
1108 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
1109 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
1110 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
1111 0x2018,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
1112 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
1113 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
1114 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0xFFFF,
1115 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1116 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1117 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1118 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1119 0xFFFF,0x00A1,0x00A2,0x00A3,0x2215,0x00A5,0x0192,0x00A7,
1120 0x00A4,0x0027,0x201C,0x00AB,0x2039,0x203A,0xFB01,0xFB02,
1121 0xFFFF,0x2013,0x2020,0x2021,0x00B7,0xFFFF,0x00B6,0x2022,
1122 0x201A,0x201E,0x201D,0x00BB,0x2026,0x2030,0xFFFF,0x00BF,
1123 0xFFFF,0x0060,0x00B4,0x02C6,0x02DC,0x00AF,0x02D8,0x02D9,
1124 0x00A8,0xFFFF,0x02DA,0x00B8,0xFFFF,0x02DD,0x02DB,0x02C7,
1125 0x2014,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1126 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1127 0xFFFF,0x00C6,0xFFFF,0x00AA,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1128 0x0141,0x00D8,0x0152,0x00BA,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1129 0xFFFF,0x00E6,0xFFFF,0xFFFF,0xFFFF,0x0131,0xFFFF,0xFFFF,
1130 0x0142,0x00F8,0x0153,0x00DF,0xFFFF,0xFFFF,0xFFFF,0xFFFF } },
1131 { RTL_TEXTENCODING_ADOBE_SYMBOL,
1132 { 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1133 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1134 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1135 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1136 0x0020,0x0021,0x2200,0x0023,0x2203,0x0025,0x0026,0x220B,
1137 0x0028,0x0029,0x2217,0x002B,0x002C,0x2212,0x002E,0x002F,
1138 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1139 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1140 0x2245,0x0391,0x0392,0x03A7,0x0394,0x0395,0x03A6,0x0393,
1141 0x0397,0x0399,0x03D1,0x039A,0x039B,0x039C,0x039D,0x039F,
1142 0x03A0,0x0398,0x03A1,0x03A3,0x03A4,0x03A5,0x03C2,0x03A9,
1143 0x039E,0x03A8,0x0396,0x005B,0x2234,0x005D,0x22A5,0x005F,
1144 0xF8E5,0x03B1,0x03B2,0x03C7,0x03B4,0x03B5,0x03C6,0x03B3,
1145 0x03B7,0x03B9,0x03D5,0x03BA,0x03BB,0x03BC,0x03BD,0x03BF,
1146 0x03C0,0x03B8,0x03C1,0x03C3,0x03C4,0x03C5,0x03D6,0x03C9,
1147 0x03BE,0x03C8,0x03B6,0x007B,0x007C,0x007D,0x223C,0xFFFF,
1148 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1149 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1150 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1151 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1152 0x20AC,0x03D2,0x2032,0x2264,0x2215,0x221E,0x0192,0x2663,
1153 0x2666,0x2665,0x2660,0x2194,0x2190,0x2191,0x2192,0x2193,
1154 0x00B0,0x00B1,0x2033,0x2265,0x00D7,0x221D,0x2202,0x2022,
1155 0x00F7,0x2260,0x2261,0x2248,0x2026,0x23AF,0x23D0,0x21B5,
1156 0x2135,0x2111,0x211C,0x2118,0x2297,0x2295,0x2205,0x2229,
1157 0x222A,0x2283,0x2287,0x2284,0x2282,0x2286,0x2208,0x2209,
1158 0x2220,0x2207,0xF6DA,0xF6D9,0xF6DB,0x220F,0x221A,0x22C5,
1159 0x00AC,0x2227,0x2228,0x21D4,0x21D0,0x21D1,0x21D2,0x21D3,
1160 0x25CA,0x2329,0xF8E8,0xF8E9,0xF8EA,0x2211,0x239B,0x239C,
1161 0x239D,0x23A1,0x23A2,0x23A3,0x23A7,0x23A8,0x23A9,0x23AA,
1162 0xFFFF,0x232A,0x222B,0x2320,0x23AE,0x2321,0x239E,0x239F,
1163 0x23A0,0x23A4,0x23A5,0x23A6,0x23AB,0x23AC,0x23AD,0xFFFF } },
1164 { RTL_TEXTENCODING_ADOBE_DINGBATS,
1165 { 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1166 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1167 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1168 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1169 // 20
1170 0x0020,0x2701,0x2702,0x2703,0x2704,0x260E,0x2706,0x2707,
1171 0x2708,0x2709,0x261B,0x261E,0x270C,0x270D,0x270E,0x270F,
1172 0x2710,0x2711,0x2712,0x2713,0x2714,0x2715,0x2716,0x2717,
1173 0x2718,0x2719,0x271A,0x271B,0x271C,0x271D,0x271E,0x271F,
1174 // 40
1175 0x2720,0x2721,0x2722,0x2723,0x2724,0x2725,0x2726,0x2727,
1176 0x2605,0x2729,0x272A,0x272B,0x272C,0x272D,0x272E,0x272F,
1177 0x2730,0x2731,0x2732,0x2733,0x2734,0x2735,0x2736,0x2737,
1178 0x2738,0x2739,0x273A,0x273B,0x273C,0x273D,0x273E,0x273F,
1179 // 60
1180 0x2740,0x2741,0x2742,0x2743,0x2744,0x2745,0x2746,0x2747,
1181 0x2748,0x2749,0x274A,0x274B,0x27CF,0x274D,0x25A0,0x274F,
1182 0x2750,0x2751,0x2752,0x25B2,0x25BC,0x25C6,0x2756,0x25D7,
1183 0x2758,0x2759,0x275A,0x275B,0x275C,0x275D,0x275E,0xFFFF,
1184 // 80
1185 0xF8D7,0xF8D8,0xF8D9,0xF8DA,0xF8DB,0xF8DC,0xF8DD,0xF8DE,
1186 0xF8DF,0xF8E0,0xF8E1,0xF8E2,0xF8E3,0xF8E4,0xFFFF,0xFFFF,
1187 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1188 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
1189 // A0
1190 0xFFFF,0x2761,0x2762,0x2763,0x2764,0x2765,0x2766,0x2767,
1191 0x2663,0x2666,0x2665,0x2660,0x2460,0x2461,0x2462,0x2463,
1192 0x2464,0x2465,0x2466,0x2467,0x2468,0x2469,0x2776,0x2777,
1193 0x2778,0x2779,0x277A,0x277B,0x277C,0x277D,0x277E,0x277F,
1194 // C0
1195 0x2780,0x2781,0x2782,0x2783,0x2784,0x2785,0x2786,0x2787,
1196 0x2788,0x2789,0x278A,0x278B,0x278C,0x278D,0x278E,0x278F,
1197 0x2790,0x2791,0x2792,0x2793,0x2794,0x2795,0x2796,0x2797,
1198 0x2798,0x2799,0x279A,0x279B,0x279C,0x279D,0x279E,0x279F,
1199 // E0
1200 0x27A0,0x27A1,0x27A2,0x27A3,0x27A4,0x27A5,0x27A6,0x27A7,
1201 0x27A8,0x27A9,0x27AA,0x27AB,0x27AC,0x27AD,0x27AE,0x27AF,
1202 0xFFFF,0x27B1,0x27B2,0x27B3,0x27B4,0x27B5,0x27B6,0x27B7,
1203 0x27B8,0x27B9,0x27BA,0x27BB,0x27BC,0x27BD,0x27BE,0xFFFF } },
1204 { RTL_TEXTENCODING_PT154,
1205 { 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
1206 0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
1207 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
1208 0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
1209 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
1210 0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
1211 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
1212 0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
1213 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
1214 0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
1215 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
1216 0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
1217 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
1218 0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
1219 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
1220 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
1221 0x0496,0x0492,0x04EE,0x0493,0x201E,0x2026,0x04B6,0x04AE,
1222 0x04B2,0x04AF,0x04A0,0x04E2,0x04A2,0x049A,0x04BA,0x04B8,
1223 0x0497,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
1224 0x04B3,0x04B7,0x04A1,0x04E3,0x04A3,0x049B,0x04BB,0x04B9,
1225 0x00A0,0x040E,0x045E,0x0408,0x04E8,0x0498,0x04B0,0x00A7,
1226 0x0401,0x00A9,0x04D8,0x00AB,0x00AC,0x04EF,0x00AE,0x049C,
1227 0x00B0,0x04B1,0x0406,0x0456,0x0499,0x04E9,0x00B6,0x00B7,
1228 0x0451,0x2116,0x04D9,0x00BB,0x0458,0x04AA,0x04AB,0x049D,
1229 0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
1230 0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
1231 0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
1232 0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
1233 0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
1234 0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
1235 0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
1236 0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F } } };
1237 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
1238 testSingleByteCharSet(data[i]);
1239 }
1240 }
1241
TEST_F(Test,testComplex)1242 TEST_F(Test, testComplex) {
1243 static ComplexCharSetTest const data[]
1244 = { { RTL_TEXTENCODING_ASCII_US,
1245 RTL_CONSTASCII_STRINGPARAM("\x01\"3De$~"),
1246 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E },
1247 7,
1248 true,
1249 true,
1250 true,
1251 false,
1252 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1253 { RTL_TEXTENCODING_EUC_CN,
1254 RTL_CONSTASCII_STRINGPARAM("\x01\"3De$~\xA1\xB9\xF0\xC5"),
1255 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E,
1256 0x300D,0x9E4B },
1257 9,
1258 true,
1259 true,
1260 true,
1261 false,
1262 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1263 { RTL_TEXTENCODING_EUC_TW,
1264 RTL_CONSTASCII_STRINGPARAM(
1265 "\x01\"3De$~\xC5\xF0\x8E\xA4\xDC\xD9"),
1266 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E,
1267 0x4ED9,0xD87E,0xDD68 },
1268 10,
1269 true,
1270 true,
1271 true,
1272 false,
1273 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1274 { RTL_TEXTENCODING_GB_18030,
1275 RTL_CONSTASCII_STRINGPARAM("\x01\"3De$~"),
1276 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E },
1277 7,
1278 true,
1279 true,
1280 true,
1281 false,
1282 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1283 { RTL_TEXTENCODING_GB_18030,
1284 RTL_CONSTASCII_STRINGPARAM("\x81\x40\xFE\xFE"),
1285 { 0x4E02,0xE4C5 },
1286 2,
1287 true,
1288 true,
1289 true,
1290 false,
1291 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1292 { RTL_TEXTENCODING_GB_18030,
1293 RTL_CONSTASCII_STRINGPARAM(
1294 "\x81\x30\xB1\x33\x81\x30\xD3\x30\x81\x36\xA5\x31"),
1295 { 0x028A,0x0452,0x200F },
1296 3,
1297 true,
1298 true,
1299 true,
1300 false,
1301 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1302 { RTL_TEXTENCODING_GB_18030,
1303 RTL_CONSTASCII_STRINGPARAM(
1304 "\xFE\x50\xFE\x51\xFE\x52\xFE\x53\xFE\x54\xFE\x55\xFE\x56"
1305 "\xFE\x57\xFE\x58\xFE\x59\xFE\x5A\xFE\x5B\xFE\x5C\xFE\x5D"
1306 "\xFE\x5E\xFE\x5F\xFE\x60\xFE\x61\xFE\x62\xFE\x63\xFE\x64"
1307 "\xFE\x65\xFE\x66\xFE\x67\xFE\x68\xFE\x69\xFE\x6A\xFE\x6B"
1308 "\xFE\x6C\xFE\x6D\xFE\x6E\xFE\x6F\xFE\x70\xFE\x71\xFE\x72"
1309 "\xFE\x73\xFE\x74\xFE\x75\xFE\x76\xFE\x77\xFE\x78\xFE\x79"
1310 "\xFE\x7A\xFE\x7B\xFE\x7C\xFE\x7D\xFE\x7E\xFE\x80\xFE\x81"
1311 "\xFE\x82\xFE\x83\xFE\x84\xFE\x85\xFE\x86\xFE\x87\xFE\x88"
1312 "\xFE\x89\xFE\x8A\xFE\x8B\xFE\x8C\xFE\x8D\xFE\x8E\xFE\x8F"
1313 "\xFE\x90\xFE\x91\xFE\x92\xFE\x93\xFE\x94\xFE\x95\xFE\x96"
1314 "\xFE\x97\xFE\x98\xFE\x99\xFE\x9A\xFE\x9B\xFE\x9C\xFE\x9D"
1315 "\xFE\x9E\xFE\x9F\xFE\xA0"),
1316 { 0x2E81,0xE816,0xE817,0xE818,0x2E84,0x3473,0x3447,0x2E88,
1317 0x2E8B,0xE81E,0x359E,0x361A,0x360E,0x2E8C,0x2E97,0x396E,
1318 0x3918,0xE826,0x39CF,0x39DF,0x3A73,0x39D0,0xE82B,0xE82C,
1319 0x3B4E,0x3C6E,0x3CE0,0x2EA7,0xE831,0xE832,0x2EAA,0x4056,
1320 0x415F,0x2EAE,0x4337,0x2EB3,0x2EB6,0x2EB7,0xE83B,0x43B1,
1321 0x43AC,0x2EBB,0x43DD,0x44D6,0x4661,0x464C,0xE843,0x4723,
1322 0x4729,0x477C,0x478D,0x2ECA,0x4947,0x497A,0x497D,0x4982,
1323 0x4983,0x4985,0x4986,0x499F,0x499B,0x49B7,0x49B6,0xE854,
1324 0xE855,0x4CA3,0x4C9F,0x4CA0,0x4CA1,0x4C77,0x4CA2,0x4D13,
1325 0x4D14,0x4D15,0x4D16,0x4D17,0x4D18,0x4D19,0x4DAE,0xE864 },
1326 80,
1327 true,
1328 true,
1329 false,
1330 false,
1331 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1332 { RTL_TEXTENCODING_ISO_2022_JP,
1333 RTL_CONSTASCII_STRINGPARAM("\x01\"3De$\\~"),
1334 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E },
1335 8,
1336 false,
1337 true,
1338 true,
1339 false,
1340 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1341 { RTL_TEXTENCODING_ISO_2022_JP,
1342 RTL_CONSTASCII_STRINGPARAM("\x1B(B\x01\"3De$\\~"),
1343 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E },
1344 8,
1345 false,
1346 true,
1347 false,
1348 false,
1349 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1350 { RTL_TEXTENCODING_ISO_2022_JP,
1351 RTL_CONSTASCII_STRINGPARAM("\x1B(J\x01\"3De$\\~"),
1352 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x00A5,0x00AF },
1353 8,
1354 false,
1355 true,
1356 false,
1357 false,
1358 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1359 { RTL_TEXTENCODING_ISO_2022_JP,
1360 RTL_CONSTASCII_STRINGPARAM("\x1B$B\x26\x21\x27\x71\x1B(B"),
1361 { 0x0391,0x044F },
1362 2,
1363 false,
1364 true,
1365 true,
1366 false,
1367 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1368 { RTL_TEXTENCODING_ISO_2022_KR,
1369 RTL_CONSTASCII_STRINGPARAM("\x1B$)C\x01\"3De$\\~"),
1370 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E },
1371 8,
1372 false,
1373 true,
1374 true,
1375 false,
1376 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1377 { RTL_TEXTENCODING_ISO_2022_KR,
1378 RTL_CONSTASCII_STRINGPARAM(
1379 "\x1B$)C\x0E\x25\x21\x0F\x0D\x0Ax\x0E\x48\x7E\x0F"),
1380 { 0x2170,0x000D,0x000A,0x0078,0xD79D },
1381 5,
1382 false,
1383 true,
1384 true,
1385 false,
1386 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1387 { RTL_TEXTENCODING_ISO_2022_CN,
1388 RTL_CONSTASCII_STRINGPARAM(
1389 "\x01\"3De$\\~\x1B$)G\x0E\x45\x70\x1B$*H\x1BN\x22\x22"
1390 "\x45\x70\x0F\x1B$)A\x0E\x26\x21\x0F"),
1391 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E,
1392 0x4ED9,0x531F,0x4ED9,0x0391 },
1393 12,
1394 false,
1395 true,
1396 false,
1397 false,
1398 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1399 { RTL_TEXTENCODING_ISO_2022_CN,
1400 RTL_CONSTASCII_STRINGPARAM(
1401 "\x01\"3De$\\~\x1B$)A\x0E\x26\x21\x1B$*H\x1BN\x22\x22"
1402 "\x26\x21\x0F\x0D\x0A\x1B$)A\x0E\x26\x21\x0F"),
1403 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x005C,0x007E,
1404 0x0391,0x531F,0x0391,0x000D,0x000A,0x0391 },
1405 14,
1406 false,
1407 true,
1408 true,
1409 false,
1410 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1411 // The following does not work as long as Big5-HKSCS maps to
1412 // Unicode PUA instead of Plane 2. Use the next two tests
1413 // instead:
1414 // { RTL_TEXTENCODING_BIG5_HKSCS,
1415 // RTL_CONSTASCII_STRINGPARAM(
1416 // "\x01\"3De$~\x88\x56\xF9\xFE\xFA\x5E\xA1\x40\xF9\xD5"),
1417 // { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E,0x0100,
1418 // 0xFFED,0xD849,0xDD13,0x3000,0x9F98 },
1419 // 13,
1420 // true,
1421 // true,
1422 // true,
1423 // false,
1424 // RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1425 { RTL_TEXTENCODING_BIG5_HKSCS,
1426 RTL_CONSTASCII_STRINGPARAM(
1427 "\x01\"3De$~\x88\x56\xF9\xFE\xFA\x5E\xA1\x40\xF9\xD5"),
1428 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E,0x0100,
1429 0xFFED,0xE01E,0x3000,0x9F98 },
1430 12,
1431 true,
1432 true,
1433 true,
1434 false,
1435 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1436 { RTL_TEXTENCODING_BIG5_HKSCS,
1437 RTL_CONSTASCII_STRINGPARAM(
1438 "\x01\"3De$~\x88\x56\xF9\xFE\xFA\x5E\xA1\x40\xF9\xD5"),
1439 { 0x0001,0x0022,0x0033,0x0044,0x0065,0x0024,0x007E,0x0100,
1440 0xFFED,0xD849,0xDD13,0x3000,0x9F98 },
1441 13,
1442 true,
1443 false,
1444 true,
1445 false,
1446 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1447 { RTL_TEXTENCODING_BIG5_HKSCS,
1448 RTL_CONSTASCII_STRINGPARAM(
1449 "\xC6\xA1\xC6\xCF\xC6\xD3\xC6\xD5\xC6\xD7\xC6\xDE\xC6\xDF"
1450 "\xC6\xFE\xC7\x40\xC7\x7E\xC7\xA1\xC7\xFE"),
1451 { 0x2460,0xF6E0,0xF6E4,0xF6E6,0xF6E8,0xF6EF,0xF6F0,0x3058,
1452 0x3059,0x30A4,0x30A5,0x041A },
1453 12,
1454 true,
1455 true,
1456 true,
1457 false,
1458 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1459 { RTL_TEXTENCODING_BIG5_HKSCS,
1460 RTL_CONSTASCII_STRINGPARAM("\x81\x40\x84\xFE"),
1461 { 0xEEB8,0xF12B },
1462 2,
1463 true,
1464 true,
1465 true,
1466 false,
1467 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1468 { RTL_TEXTENCODING_BIG5_HKSCS,
1469 RTL_CONSTASCII_STRINGPARAM(
1470 "\x81\x40\x8D\xFE\x8E\x40\xA0\xFE\xC6\xA1\xC8\xFE\xFA\x40"
1471 "\xFE\xFE"),
1472 { 0xEEB8,0xF6B0,0xE311,0xEEB7,0xF6B1,0xF848,0xE000,0xE310 },
1473 8,
1474 true,
1475 false,
1476 true,
1477 false,
1478 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1479 { RTL_TEXTENCODING_BIG5_HKSCS,
1480 RTL_CONSTASCII_STRINGPARAM("\xAD\xC5\x94\x55"),
1481 { 0x5029,0x7250 },
1482 2,
1483 true,
1484 true,
1485 true,
1486 false,
1487 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1488 { RTL_TEXTENCODING_BIG5_HKSCS,
1489 RTL_CONSTASCII_STRINGPARAM("\xFA\x5F\xA0\xE4"),
1490 { 0x5029,0x7250 },
1491 2,
1492 true,
1493 true,
1494 false,
1495 false,
1496 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1497 { RTL_TEXTENCODING_BIG5_HKSCS,
1498 RTL_CONSTASCII_STRINGPARAM("\xA0\x40\xA0\x7E\xA0\xA1\xA0\xFE"),
1499 { 0xEE1B,0xEE59,0xEE5A,0xEEB7 },
1500 4,
1501 true,
1502 false,
1503 true,
1504 false,
1505 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1506 { RTL_TEXTENCODING_BIG5,
1507 RTL_CONSTASCII_STRINGPARAM("\xA1\x45"),
1508 { 0x2027 },
1509 1,
1510 true,
1511 true,
1512 true,
1513 false,
1514 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1515 { RTL_TEXTENCODING_BIG5,
1516 RTL_CONSTASCII_STRINGPARAM(
1517 "\xC6\xCF\xC6\xD3\xC6\xD5\xC6\xD7\xC6\xDE\xC6\xDF"),
1518 { 0x306B,0x306F,0x3071,0x3073,0x307A,0x307B },
1519 6,
1520 true,
1521 true,
1522 true,
1523 false,
1524 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1525 { RTL_TEXTENCODING_BIG5,
1526 RTL_CONSTASCII_STRINGPARAM(
1527 "\xC7\xFD\xC7\xFE\xC8\x40\xC8\x7E\xC8\xA1\xC8\xFE"),
1528 { 0xF7AA,0xF7AB,0xF7AC,0xF7EA,0xF7EB,0xF848 },
1529 6,
1530 true,
1531 true,
1532 true,
1533 false,
1534 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1535 { RTL_TEXTENCODING_BIG5,
1536 RTL_CONSTASCII_STRINGPARAM("\xA0\x40\xA0\x7E\xA0\xA1\xA0\xFE"),
1537 { 0xEE1B,0xEE59,0xEE5A,0xEEB7 },
1538 4,
1539 true,
1540 true,
1541 true,
1542 false,
1543 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1544 { RTL_TEXTENCODING_MS_950,
1545 RTL_CONSTASCII_STRINGPARAM(
1546 "\xC6\xA1\xC6\xFE\xC7\x40\xC7\x7E\xC7\xA1\xC7\xFE\xC8\x40"
1547 "\xC8\x7E\xC8\xA1\xC8\xFE"),
1548 { 0xF6B1,0xF70E,0xF70F,0xF74D,0xF74E,0xF7AB,0xF7AC,0xF7EA,
1549 0xF7EB,0xF848 },
1550 10,
1551 true,
1552 true,
1553 true,
1554 false,
1555 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1556 { RTL_TEXTENCODING_MS_950,
1557 RTL_CONSTASCII_STRINGPARAM("\xA0\x40\xA0\x7E\xA0\xA1\xA0\xFE"),
1558 { 0xEE1B,0xEE59,0xEE5A,0xEEB7 },
1559 4,
1560 true,
1561 true,
1562 true,
1563 false,
1564 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1565
1566 // Test Unicode beyond BMP:
1567
1568 // FIXME The second m_bForward test (requiring a context) does not
1569 // work for UTF7:
1570 // { RTL_TEXTENCODING_UTF7,
1571 // RTL_CONSTASCII_STRINGPARAM("+2EndEw-"),
1572 // { 0xD849,0xDD13 },
1573 // 2,
1574 // true,
1575 // true,
1576 // true,
1577 // false,
1578 // RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1579 { RTL_TEXTENCODING_UTF8,
1580 RTL_CONSTASCII_STRINGPARAM("\xF0\xA2\x94\x93"),
1581 { 0xD849,0xDD13 },
1582 2,
1583 true,
1584 true,
1585 true,
1586 false,
1587 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1588 { RTL_TEXTENCODING_GB_18030,
1589 RTL_CONSTASCII_STRINGPARAM("\x95\x39\xC5\x37"),
1590 { 0xD849,0xDD13 },
1591 2,
1592 true,
1593 true,
1594 true,
1595 false,
1596 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1597 { RTL_TEXTENCODING_BIG5_HKSCS,
1598 RTL_CONSTASCII_STRINGPARAM("\xFA\x5E"),
1599 { 0xD849,0xDD13 },
1600 2,
1601 true,
1602 false,
1603 true,
1604 false,
1605 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1606
1607 // Test GBK (aka CP936):
1608
1609 { RTL_TEXTENCODING_GBK,
1610 RTL_CONSTASCII_STRINGPARAM("\xFD\x7C\xC1\xFA\xFD\x9B"),
1611 { 0x9F76,0x9F99,0x9FA5 },
1612 3,
1613 true,
1614 true,
1615 true,
1616 false,
1617 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1618 { RTL_TEXTENCODING_MS_936,
1619 RTL_CONSTASCII_STRINGPARAM("\xFD\x7C\xC1\xFA\xFD\x9B"),
1620 { 0x9F76,0x9F99,0x9FA5 },
1621 3,
1622 true,
1623 true,
1624 true,
1625 false,
1626 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1627 { RTL_TEXTENCODING_GBK,
1628 RTL_CONSTASCII_STRINGPARAM(
1629 "\xFE\x50\xFE\x54\xFE\x55\xFE\x56"
1630 "\xFE\x57\xFE\x58\xFE\x5A\xFE\x5B\xFE\x5C\xFE\x5D"
1631 "\xFE\x5E\xFE\x5F\xFE\x60\xFE\x62\xFE\x63\xFE\x64"
1632 "\xFE\x65\xFE\x68\xFE\x69\xFE\x6A\xFE\x6B"
1633 "\xFE\x6E\xFE\x6F\xFE\x70\xFE\x71\xFE\x72"
1634 "\xFE\x73\xFE\x74\xFE\x75\xFE\x77\xFE\x78\xFE\x79"
1635 "\xFE\x7A\xFE\x7B\xFE\x7C\xFE\x7D\xFE\x80\xFE\x81"
1636 "\xFE\x82\xFE\x83\xFE\x84\xFE\x85\xFE\x86\xFE\x87\xFE\x88"
1637 "\xFE\x89\xFE\x8A\xFE\x8B\xFE\x8C\xFE\x8D\xFE\x8E\xFE\x8F"
1638 "\xFE\x92\xFE\x93\xFE\x94\xFE\x95\xFE\x96"
1639 "\xFE\x97\xFE\x98\xFE\x99\xFE\x9A\xFE\x9B\xFE\x9C\xFE\x9D"
1640 "\xFE\x9E\xFE\x9F"),
1641 { 0x2E81,0x2E84,0x3473,0x3447,0x2E88,0x2E8B,0x359E,0x361A,
1642 0x360E,0x2E8C,0x2E97,0x396E,0x3918,0x39CF,0x39DF,0x3A73,
1643 0x39D0,0x3B4E,0x3C6E,0x3CE0,0x2EA7,0x2EAA,0x4056,0x415F,
1644 0x2EAE,0x4337,0x2EB3,0x2EB6,0x2EB7,0x43B1,0x43AC,0x2EBB,
1645 0x43DD,0x44D6,0x4661,0x464C,0x4723,0x4729,0x477C,0x478D,
1646 0x2ECA,0x4947,0x497A,0x497D,0x4982,0x4983,0x4985,0x4986,
1647 0x499F,0x499B,0x49B7,0x49B6,0x4CA3,0x4C9F,0x4CA0,0x4CA1,
1648 0x4C77,0x4CA2,0x4D13,0x4D14,0x4D15,0x4D16,0x4D17,0x4D18,
1649 0x4D19,0x4DAE },
1650 66,
1651 true,
1652 true,
1653 true,
1654 false,
1655 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1656 { RTL_TEXTENCODING_EUC_JP,
1657 RTL_CONSTASCII_STRINGPARAM("?"),
1658 { 0xFF0D },
1659 1,
1660 true,
1661 false,
1662 true,
1663 false,
1664 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK },
1665
1666 // Test of "JIS X 0208 row 13" (taken from CP932; added to
1667 // ISO-2022-JP and EUC-JP; 74 of the 83 characters introduce
1668 // mappings to new Unicode characters):
1669 { RTL_TEXTENCODING_MS_932,
1670 RTL_CONSTASCII_STRINGPARAM(
1671 "\x87\x40\x87\x41\x87\x42\x87\x43\x87\x44\x87\x45\x87\x46"
1672 "\x87\x47\x87\x48\x87\x49\x87\x4A\x87\x4B\x87\x4C\x87\x4D"
1673 "\x87\x4E\x87\x4F\x87\x50\x87\x51\x87\x52\x87\x53\x87\x54"
1674 "\x87\x55\x87\x56\x87\x57\x87\x58\x87\x59\x87\x5A\x87\x5B"
1675 "\x87\x5C\x87\x5D\x87\x5F\x87\x60\x87\x61\x87\x62\x87\x63"
1676 "\x87\x64\x87\x65\x87\x66\x87\x67\x87\x68\x87\x69\x87\x6A"
1677 "\x87\x6B\x87\x6C\x87\x6D\x87\x6E\x87\x6F\x87\x70\x87\x71"
1678 "\x87\x72\x87\x73\x87\x74\x87\x75\x87\x7E\x87\x80\x87\x81"
1679 "\x87\x82\x87\x83\x87\x84\x87\x85\x87\x86\x87\x87\x87\x88"
1680 "\x87\x89\x87\x8A\x87\x8B\x87\x8C\x87\x8D\x87\x8E\x87\x8F"
1681 "\x87\x90\x87\x91\x87\x92\x87\x93\x87\x94\x87\x95\x87\x96"
1682 "\x87\x97\x87\x98\x87\x99\x87\x9A\x87\x9B\x87\x9C"),
1683 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1684 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1685 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1686 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1687 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1688 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1689 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1690 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x2252,0x2261,
1691 0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,0x22BF,0x2235,
1692 0x2229,0x222A },
1693 83,
1694 true,
1695 true,
1696 false,
1697 false,
1698 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1699 { RTL_TEXTENCODING_SHIFT_JIS,
1700 RTL_CONSTASCII_STRINGPARAM(
1701 "\x87\x40\x87\x41\x87\x42\x87\x43\x87\x44\x87\x45\x87\x46"
1702 "\x87\x47\x87\x48\x87\x49\x87\x4A\x87\x4B\x87\x4C\x87\x4D"
1703 "\x87\x4E\x87\x4F\x87\x50\x87\x51\x87\x52\x87\x53\x87\x54"
1704 "\x87\x55\x87\x56\x87\x57\x87\x58\x87\x59\x87\x5A\x87\x5B"
1705 "\x87\x5C\x87\x5D\x87\x5F\x87\x60\x87\x61\x87\x62\x87\x63"
1706 "\x87\x64\x87\x65\x87\x66\x87\x67\x87\x68\x87\x69\x87\x6A"
1707 "\x87\x6B\x87\x6C\x87\x6D\x87\x6E\x87\x6F\x87\x70\x87\x71"
1708 "\x87\x72\x87\x73\x87\x74\x87\x75\x87\x7E\x87\x80\x87\x81"
1709 "\x87\x82\x87\x83\x87\x84\x87\x85\x87\x86\x87\x87\x87\x88"
1710 "\x87\x89\x87\x8A\x87\x8B\x87\x8C\x87\x8D\x87\x8E\x87\x8F"
1711 "\x87\x90\x87\x91\x87\x92\x87\x93\x87\x94\x87\x95\x87\x96"
1712 "\x87\x97\x87\x98\x87\x99\x87\x9A\x87\x9B\x87\x9C"),
1713 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1714 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1715 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1716 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1717 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1718 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1719 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1720 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x2252,0x2261,
1721 0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,0x22BF,0x2235,
1722 0x2229,0x222A },
1723 83,
1724 true,
1725 true,
1726 false,
1727 false,
1728 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1729 { RTL_TEXTENCODING_ISO_2022_JP,
1730 RTL_CONSTASCII_STRINGPARAM(
1731 "\x1B$B\x2D\x21\x2D\x22\x2D\x23\x2D\x24\x2D\x25\x2D\x26"
1732 "\x2D\x27\x2D\x28\x2D\x29\x2D\x2A\x2D\x2B\x2D\x2C\x2D\x2D"
1733 "\x2D\x2E\x2D\x2F\x2D\x30\x2D\x31\x2D\x32\x2D\x33\x2D\x34"
1734 "\x2D\x35\x2D\x36\x2D\x37\x2D\x38\x2D\x39\x2D\x3A\x2D\x3B"
1735 "\x2D\x3C\x2D\x3D\x2D\x3E\x2D\x40\x2D\x41\x2D\x42\x2D\x43"
1736 "\x2D\x44\x2D\x45\x2D\x46\x2D\x47\x2D\x48\x2D\x49\x2D\x4A"
1737 "\x2D\x4B\x2D\x4C\x2D\x4D\x2D\x4E\x2D\x4F\x2D\x50\x2D\x51"
1738 "\x2D\x52\x2D\x53\x2D\x54\x2D\x55\x2D\x56\x2D\x5F\x2D\x60"
1739 "\x2D\x61\x2D\x62\x2D\x63\x2D\x64\x2D\x65\x2D\x66\x2D\x67"
1740 "\x2D\x68\x2D\x69\x2D\x6A\x2D\x6B\x2D\x6C\x2D\x6D\x2D\x6E"
1741 "\x2D\x6F\x2D\x70\x2D\x71\x2D\x72\x2D\x73\x2D\x74\x2D\x75"
1742 "\x2D\x76\x2D\x77\x2D\x78\x2D\x79\x2D\x7A\x2D\x7B\x2D\x7C"
1743 "\x1B(B"),
1744 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1745 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1746 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1747 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1748 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1749 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1750 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1751 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x2252,0x2261,
1752 0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,0x22BF,0x2235,
1753 0x2229,0x222A },
1754 83,
1755 false,
1756 true,
1757 false,
1758 false,
1759 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1760 { RTL_TEXTENCODING_ISO_2022_JP,
1761 RTL_CONSTASCII_STRINGPARAM(
1762 "\x1B$B\x2D\x21\x2D\x22\x2D\x23\x2D\x24\x2D\x25\x2D\x26"
1763 "\x2D\x27\x2D\x28\x2D\x29\x2D\x2A\x2D\x2B\x2D\x2C\x2D\x2D"
1764 "\x2D\x2E\x2D\x2F\x2D\x30\x2D\x31\x2D\x32\x2D\x33\x2D\x34"
1765 "\x2D\x35\x2D\x36\x2D\x37\x2D\x38\x2D\x39\x2D\x3A\x2D\x3B"
1766 "\x2D\x3C\x2D\x3D\x2D\x3E\x2D\x40\x2D\x41\x2D\x42\x2D\x43"
1767 "\x2D\x44\x2D\x45\x2D\x46\x2D\x47\x2D\x48\x2D\x49\x2D\x4A"
1768 "\x2D\x4B\x2D\x4C\x2D\x4D\x2D\x4E\x2D\x4F\x2D\x50\x2D\x51"
1769 "\x2D\x52\x2D\x53\x2D\x54\x2D\x55\x2D\x56\x2D\x5F\x2D\x60"
1770 "\x2D\x61\x2D\x62\x2D\x63\x2D\x64\x2D\x65\x2D\x66\x2D\x67"
1771 "\x2D\x68\x2D\x69\x2D\x6A\x2D\x6B\x2D\x6C\x2D\x6D\x2D\x6E"
1772 "\x2D\x6F\x2D\x73\x2D\x74\x2D\x78\x2D\x79\x1B(B"),
1773 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1774 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1775 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1776 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1777 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1778 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1779 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1780 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x222E,0x2211,
1781 0x221F,0x22BF },
1782 74,
1783 false,
1784 true,
1785 true,
1786 false,
1787 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1788 { RTL_TEXTENCODING_EUC_JP,
1789 RTL_CONSTASCII_STRINGPARAM(
1790 "\xAD\xA1\xAD\xA2\xAD\xA3\xAD\xA4\xAD\xA5\xAD\xA6\xAD\xA7"
1791 "\xAD\xA8\xAD\xA9\xAD\xAA\xAD\xAB\xAD\xAC\xAD\xAD\xAD\xAE"
1792 "\xAD\xAF\xAD\xB0\xAD\xB1\xAD\xB2\xAD\xB3\xAD\xB4\xAD\xB5"
1793 "\xAD\xB6\xAD\xB7\xAD\xB8\xAD\xB9\xAD\xBA\xAD\xBB\xAD\xBC"
1794 "\xAD\xBD\xAD\xBE\xAD\xC0\xAD\xC1\xAD\xC2\xAD\xC3\xAD\xC4"
1795 "\xAD\xC5\xAD\xC6\xAD\xC7\xAD\xC8\xAD\xC9\xAD\xCA\xAD\xCB"
1796 "\xAD\xCC\xAD\xCD\xAD\xCE\xAD\xCF\xAD\xD0\xAD\xD1\xAD\xD2"
1797 "\xAD\xD3\xAD\xD4\xAD\xD5\xAD\xD6\xAD\xDF\xAD\xE0\xAD\xE1"
1798 "\xAD\xE2\xAD\xE3\xAD\xE4\xAD\xE5\xAD\xE6\xAD\xE7\xAD\xE8"
1799 "\xAD\xE9\xAD\xEA\xAD\xEB\xAD\xEC\xAD\xED\xAD\xEE\xAD\xEF"
1800 "\xAD\xF0\xAD\xF1\xAD\xF2\xAD\xF3\xAD\xF4\xAD\xF5\xAD\xF6"
1801 "\xAD\xF7\xAD\xF8\xAD\xF9\xAD\xFA\xAD\xFB\xAD\xFC"),
1802 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1803 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1804 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1805 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1806 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1807 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1808 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1809 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x2252,0x2261,
1810 0x222B,0x222E,0x2211,0x221A,0x22A5,0x2220,0x221F,0x22BF,0x2235,
1811 0x2229,0x222A },
1812 83,
1813 true,
1814 true,
1815 false,
1816 false,
1817 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1818 { RTL_TEXTENCODING_EUC_JP,
1819 RTL_CONSTASCII_STRINGPARAM(
1820 "\xAD\xA1\xAD\xA2\xAD\xA3\xAD\xA4\xAD\xA5\xAD\xA6\xAD\xA7"
1821 "\xAD\xA8\xAD\xA9\xAD\xAA\xAD\xAB\xAD\xAC\xAD\xAD\xAD\xAE"
1822 "\xAD\xAF\xAD\xB0\xAD\xB1\xAD\xB2\xAD\xB3\xAD\xB4\xAD\xB5"
1823 "\xAD\xB6\xAD\xB7\xAD\xB8\xAD\xB9\xAD\xBA\xAD\xBB\xAD\xBC"
1824 "\xAD\xBD\xAD\xBE\xAD\xC0\xAD\xC1\xAD\xC2\xAD\xC3\xAD\xC4"
1825 "\xAD\xC5\xAD\xC6\xAD\xC7\xAD\xC8\xAD\xC9\xAD\xCA\xAD\xCB"
1826 "\xAD\xCC\xAD\xCD\xAD\xCE\xAD\xCF\xAD\xD0\xAD\xD1\xAD\xD2"
1827 "\xAD\xD3\xAD\xD4\xAD\xD5\xAD\xD6\xAD\xDF\xAD\xE0\xAD\xE1"
1828 "\xAD\xE2\xAD\xE3\xAD\xE4\xAD\xE5\xAD\xE6\xAD\xE7\xAD\xE8"
1829 "\xAD\xE9\xAD\xEA\xAD\xEB\xAD\xEC\xAD\xED\xAD\xEE\xAD\xEF"
1830 "\xAD\xF3\xAD\xF4\xAD\xF8\xAD\xF9"),
1831 { 0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,0x2468,
1832 0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,0x2470,0x2471,
1833 0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,
1834 0x2167,0x2168,0x2169,0x3349,0x3314,0x3322,0x334D,0x3318,0x3327,
1835 0x3303,0x3336,0x3351,0x3357,0x330D,0x3326,0x3323,0x332B,0x334A,
1836 0x333B,0x339C,0x339D,0x339E,0x338E,0x338F,0x33C4,0x33A1,0x337B,
1837 0x301D,0x301F,0x2116,0x33CD,0x2121,0x32A4,0x32A5,0x32A6,0x32A7,
1838 0x32A8,0x3231,0x3232,0x3239,0x337E,0x337D,0x337C,0x222E,0x2211,
1839 0x221F,0x22BF },
1840 74,
1841 true,
1842 true,
1843 true,
1844 false,
1845 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1846
1847 { RTL_TEXTENCODING_EUC_JP,
1848 RTL_CONSTASCII_STRINGPARAM("\xB9\xF5"),
1849 { 0x9ED2 },
1850 1,
1851 true,
1852 true,
1853 true,
1854 false,
1855 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1856
1857 // Test ISO-8859-x/MS-125x range 0x80--9F:
1858
1859 { RTL_TEXTENCODING_ISO_8859_1,
1860 RTL_CONSTASCII_STRINGPARAM(
1861 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1862 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1863 "\x9E\x9F"),
1864 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1865 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1866 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1867 0x009B,0x009C,0x009D,0x009E,0x009F },
1868 32,
1869 true,
1870 true,
1871 true,
1872 false,
1873 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1874 { RTL_TEXTENCODING_ISO_8859_2,
1875 RTL_CONSTASCII_STRINGPARAM(
1876 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1877 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1878 "\x9E\x9F"),
1879 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1880 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1881 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1882 0x009B,0x009C,0x009D,0x009E,0x009F },
1883 32,
1884 true,
1885 true,
1886 true,
1887 false,
1888 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1889 { RTL_TEXTENCODING_ISO_8859_3,
1890 RTL_CONSTASCII_STRINGPARAM(
1891 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1892 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1893 "\x9E\x9F"),
1894 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1895 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1896 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1897 0x009B,0x009C,0x009D,0x009E,0x009F },
1898 32,
1899 true,
1900 true,
1901 true,
1902 false,
1903 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1904 { RTL_TEXTENCODING_ISO_8859_4,
1905 RTL_CONSTASCII_STRINGPARAM(
1906 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1907 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1908 "\x9E\x9F"),
1909 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1910 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1911 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1912 0x009B,0x009C,0x009D,0x009E,0x009F },
1913 32,
1914 true,
1915 true,
1916 true,
1917 false,
1918 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1919 { RTL_TEXTENCODING_ISO_8859_5,
1920 RTL_CONSTASCII_STRINGPARAM(
1921 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1922 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1923 "\x9E\x9F"),
1924 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1925 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1926 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1927 0x009B,0x009C,0x009D,0x009E,0x009F },
1928 32,
1929 true,
1930 true,
1931 true,
1932 false,
1933 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1934 { RTL_TEXTENCODING_ISO_8859_6,
1935 RTL_CONSTASCII_STRINGPARAM(
1936 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1937 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1938 "\x9E\x9F"),
1939 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1940 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1941 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1942 0x009B,0x009C,0x009D,0x009E,0x009F },
1943 32,
1944 true,
1945 true,
1946 true,
1947 false,
1948 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1949 { RTL_TEXTENCODING_ISO_8859_7,
1950 RTL_CONSTASCII_STRINGPARAM(
1951 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1952 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1953 "\x9E\x9F"),
1954 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1955 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1956 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1957 0x009B,0x009C,0x009D,0x009E,0x009F },
1958 32,
1959 true,
1960 true,
1961 true,
1962 false,
1963 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1964 { RTL_TEXTENCODING_ISO_8859_8,
1965 RTL_CONSTASCII_STRINGPARAM(
1966 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1967 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1968 "\x9E\x9F"),
1969 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1970 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1971 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1972 0x009B,0x009C,0x009D,0x009E,0x009F },
1973 32,
1974 true,
1975 true,
1976 true,
1977 false,
1978 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1979 { RTL_TEXTENCODING_ISO_8859_9,
1980 RTL_CONSTASCII_STRINGPARAM(
1981 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1982 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1983 "\x9E\x9F"),
1984 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
1985 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
1986 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
1987 0x009B,0x009C,0x009D,0x009E,0x009F },
1988 32,
1989 true,
1990 true,
1991 true,
1992 false,
1993 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
1994 { RTL_TEXTENCODING_ISO_8859_14,
1995 RTL_CONSTASCII_STRINGPARAM(
1996 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
1997 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
1998 "\x9E\x9F"),
1999 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2000 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2001 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2002 0x009B,0x009C,0x009D,0x009E,0x009F },
2003 32,
2004 true,
2005 true,
2006 true,
2007 false,
2008 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2009 { RTL_TEXTENCODING_ISO_8859_15,
2010 RTL_CONSTASCII_STRINGPARAM(
2011 "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E"
2012 "\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D"
2013 "\x9E\x9F"),
2014 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2015 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2016 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2017 0x009B,0x009C,0x009D,0x009E,0x009F },
2018 32,
2019 true,
2020 true,
2021 true,
2022 false,
2023 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2024 { RTL_TEXTENCODING_MS_874,
2025 RTL_CONSTASCII_STRINGPARAM(""),
2026 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2027 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2028 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2029 0x009B,0x009C,0x009D,0x009E,0x009F },
2030 32,
2031 true,
2032 false,
2033 true,
2034 false,
2035 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2036 { RTL_TEXTENCODING_MS_1250,
2037 RTL_CONSTASCII_STRINGPARAM(""),
2038 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2039 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2040 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2041 0x009B,0x009C,0x009D,0x009E,0x009F },
2042 32,
2043 true,
2044 false,
2045 true,
2046 false,
2047 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2048 { RTL_TEXTENCODING_MS_1251,
2049 RTL_CONSTASCII_STRINGPARAM(""),
2050 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2051 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2052 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2053 0x009B,0x009C,0x009D,0x009E,0x009F },
2054 32,
2055 true,
2056 false,
2057 true,
2058 false,
2059 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2060 { RTL_TEXTENCODING_MS_1252,
2061 RTL_CONSTASCII_STRINGPARAM(""),
2062 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2063 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2064 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2065 0x009B,0x009C,0x009D,0x009E,0x009F },
2066 32,
2067 true,
2068 false,
2069 true,
2070 false,
2071 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2072 { RTL_TEXTENCODING_MS_1253,
2073 RTL_CONSTASCII_STRINGPARAM(""),
2074 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2075 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2076 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2077 0x009B,0x009C,0x009D,0x009E,0x009F },
2078 32,
2079 true,
2080 false,
2081 true,
2082 false,
2083 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2084 { RTL_TEXTENCODING_MS_1254,
2085 RTL_CONSTASCII_STRINGPARAM(""),
2086 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2087 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2088 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2089 0x009B,0x009C,0x009D,0x009E,0x009F },
2090 32,
2091 true,
2092 false,
2093 true,
2094 false,
2095 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2096 { RTL_TEXTENCODING_MS_1255,
2097 RTL_CONSTASCII_STRINGPARAM(""),
2098 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2099 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2100 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2101 0x009B,0x009C,0x009D,0x009E,0x009F },
2102 32,
2103 true,
2104 false,
2105 true,
2106 false,
2107 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2108 { RTL_TEXTENCODING_MS_1256,
2109 RTL_CONSTASCII_STRINGPARAM(""),
2110 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2111 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2112 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2113 0x009B,0x009C,0x009D,0x009E,0x009F },
2114 32,
2115 true,
2116 false,
2117 true,
2118 false,
2119 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2120 { RTL_TEXTENCODING_MS_1257,
2121 RTL_CONSTASCII_STRINGPARAM(""),
2122 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2123 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2124 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2125 0x009B,0x009C,0x009D,0x009E,0x009F },
2126 32,
2127 true,
2128 false,
2129 true,
2130 false,
2131 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2132 { RTL_TEXTENCODING_MS_1258,
2133 RTL_CONSTASCII_STRINGPARAM(""),
2134 { 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,
2135 0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,0x0090,0x0091,
2136 0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,
2137 0x009B,0x009C,0x009D,0x009E,0x009F },
2138 32,
2139 true,
2140 false,
2141 true,
2142 false,
2143 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2144 { RTL_TEXTENCODING_MS_949,
2145 RTL_CONSTASCII_STRINGPARAM(
2146 "\xB0\xA1\xB0\xA2\x81\x41\x81\x42\xB0\xA3\x81\x43\x81\x44"
2147 "\xB0\xA4\xB0\xA5\xB0\xA6\xB0\xA7\x81\x45\x81\x46\x81\x47"
2148 "\x81\x48\x81\x49\xB0\xA8\xB0\xA9\xB0\xAA\xB0\xAB\xB0\xAC"
2149 "\xB0\xAD\xB0\xAE\xB0\xAF\x81\x4A\xB0\xB0\xB0\xB1\xB0\xB2"),
2150 { 0xAC00,0xAC01,0xAC02,0xAC03,0xAC04,0xAC05,0xAC06,0xAC07,0xAC08,
2151 0xAC09,0xAC0A,0xAC0B,0xAC0C,0xAC0D,0xAC0E,0xAC0F,0xAC10,0xAC11,
2152 0xAC12,0xAC13,0xAC14,0xAC15,0xAC16,0xAC17,0xAC18,0xAC19,0xAC1A,
2153 0xAC1B },
2154 28,
2155 true,
2156 true,
2157 true,
2158 false,
2159 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2160 { RTL_TEXTENCODING_MS_949,
2161 RTL_CONSTASCII_STRINGPARAM(
2162 "\xC9\xA1\xC9\xA2\xC9\xA3\xC9\xFC\xC9\xFD\xC9\xFE"
2163 "\xFE\xA1\xFE\xA2\xFE\xA3\xFE\xFC\xFE\xFD\xFE\xFE"),
2164 { 0xE000,0xE001,0xE002,0xE05B,0xE05C,0xE05D,
2165 0xE05E,0xE05F,0xE060,0xE0B9,0xE0BA,0xE0BB },
2166 12,
2167 true,
2168 true,
2169 true,
2170 false,
2171 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2172 { RTL_TEXTENCODING_EUC_KR,
2173 RTL_CONSTASCII_STRINGPARAM(
2174 "\xB0\xA1\xB0\xA2" "\xB0\xA3"
2175 "\xB0\xA4\xB0\xA5\xB0\xA6\xB0\xA7"
2176 "\xB0\xA8\xB0\xA9\xB0\xAA\xB0\xAB\xB0\xAC"
2177 "\xB0\xAD\xB0\xAE\xB0\xAF" "\xB0\xB0\xB0\xB1\xB0\xB2"),
2178 { 0xAC00,0xAC01, 0xAC04, 0xAC07,0xAC08,
2179 0xAC09,0xAC0A, 0xAC10,0xAC11,
2180 0xAC12,0xAC13,0xAC14,0xAC15,0xAC16,0xAC17, 0xAC19,0xAC1A,
2181 0xAC1B },
2182 18,
2183 true,
2184 true,
2185 true,
2186 false,
2187 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2188 { RTL_TEXTENCODING_EUC_KR,
2189 RTL_CONSTASCII_STRINGPARAM(
2190 "\xB0\xA1\xB0\xA2" "\xB0\xA3"
2191 "\xB0\xA4\xB0\xA5\xB0\xA6\xB0\xA7"
2192 "\xB0\xA8\xB0\xA9\xB0\xAA\xB0\xAB\xB0\xAC"
2193 "\xB0\xAD\xB0\xAE\xB0\xAF" "\xB0\xB0\xB0\xB1\xB0\xB2"),
2194 { 0xAC00,0xAC01,0xAC02,0xAC03,0xAC04,0xAC05,0xAC06,0xAC07,0xAC08,
2195 0xAC09,0xAC0A,0xAC0B,0xAC0C,0xAC0D,0xAC0E,0xAC0F,0xAC10,0xAC11,
2196 0xAC12,0xAC13,0xAC14,0xAC15,0xAC16,0xAC17,0xAC18,0xAC19,0xAC1A,
2197 0xAC1B },
2198 28,
2199 true,
2200 false,
2201 true,
2202 false,
2203 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2204 { RTL_TEXTENCODING_EUC_KR,
2205 RTL_CONSTASCII_STRINGPARAM(
2206 "\xC9\xA1\xC9\xA2\xC9\xA3\xC9\xFC\xC9\xFD\xC9\xFE"
2207 "\xFE\xA1\xFE\xA2\xFE\xA3\xFE\xFC\xFE\xFD\xFE\xFE"),
2208 { 0xE000,0xE001,0xE002,0xE05B,0xE05C,0xE05D,
2209 0xE05E,0xE05F,0xE060,0xE0B9,0xE0BA,0xE0BB },
2210 12,
2211 true,
2212 true,
2213 true,
2214 false,
2215 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2216
2217 // Test UTF-8:
2218
2219 { RTL_TEXTENCODING_UTF8,
2220 RTL_CONSTASCII_STRINGPARAM("\x00"),
2221 { 0x0000 },
2222 1,
2223 false,
2224 true,
2225 true,
2226 false,
2227 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2228 { RTL_TEXTENCODING_UTF8,
2229 RTL_CONSTASCII_STRINGPARAM("\xEF\xBB\xBF"),
2230 { 0xFEFF },
2231 1,
2232 false,
2233 true,
2234 true,
2235 false,
2236 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2237 { RTL_TEXTENCODING_UTF8,
2238 RTL_CONSTASCII_STRINGPARAM("\xEF\xBB\xBF\xEF\xBB\xBF"),
2239 { 0xFEFF,0xFEFF },
2240 2,
2241 false,
2242 true,
2243 true,
2244 false,
2245 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2246 { RTL_TEXTENCODING_UTF8,
2247 RTL_CONSTASCII_STRINGPARAM("\xEF\xBB\xBF"),
2248 { 0 },
2249 0,
2250 false,
2251 true,
2252 true,
2253 true,
2254 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2255 { RTL_TEXTENCODING_UTF8,
2256 RTL_CONSTASCII_STRINGPARAM("\xEF\xBB\xBF\xEF\xBB\xBF"),
2257 { 0xFEFF },
2258 1,
2259 false,
2260 true,
2261 true,
2262 true,
2263 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2264 { RTL_TEXTENCODING_UTF8,
2265 RTL_CONSTASCII_STRINGPARAM("\x01\x02\x7E\x7F"),
2266 { 0x0001,0x0002,0x007E,0x007F },
2267 4,
2268 false,
2269 true,
2270 true,
2271 false,
2272 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2273 { RTL_TEXTENCODING_UTF8,
2274 RTL_CONSTASCII_STRINGPARAM(
2275 "\xC0\x80\xE0\x80\x81\xF0\x80\x80\x82\xF8\x80\x80\x80\x83"
2276 "\xFC\x80\x80\x80\x80\x84"),
2277 { 0x0000,0x0001,0x0002,0x0003,0x0004 },
2278 5,
2279 false,
2280 true,
2281 false,
2282 false,
2283 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2284 { RTL_TEXTENCODING_UTF8,
2285 RTL_CONSTASCII_STRINGPARAM("\xED\xA1\x89\xED\xB4\x93"),
2286 { 0xD849,0xDD13 },
2287 2,
2288 false,
2289 true,
2290 false,
2291 false,
2292 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2293 { RTL_TEXTENCODING_UTF8,
2294 RTL_CONSTASCII_STRINGPARAM("\xED\xA1\x89\x41"),
2295 { 0xD849,0x0041 },
2296 2,
2297 false,
2298 true,
2299 false,
2300 false,
2301 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2302
2303 // Test Java UTF-8:
2304
2305 { RTL_TEXTENCODING_JAVA_UTF8,
2306 RTL_CONSTASCII_STRINGPARAM(
2307 "\xEF\xBB\xBF\xC0\x80\x01\x20\x41\x7F\xED\xA0\x80"
2308 "\xED\xB0\x80"),
2309 { 0xFEFF,0x0000,0x0001,0x0020,0x0041,0x007F,0xD800,0xDC00 },
2310 8,
2311 false,
2312 true,
2313 true,
2314 true,
2315 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2316
2317 // Bug #112949#:
2318
2319 { RTL_TEXTENCODING_SHIFT_JIS,
2320 RTL_CONSTASCII_STRINGPARAM("\x81\x63"),
2321 { 0x2026 },
2322 1,
2323 false,
2324 true,
2325 true,
2326 false,
2327 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2328 { RTL_TEXTENCODING_SHIFT_JIS,
2329 RTL_CONSTASCII_STRINGPARAM("\xA0\xFD\xFE\xFF"),
2330 { 0x00A0, 0x00A9, 0x2122, 0x2026 },
2331 4,
2332 false,
2333 true,
2334 false,
2335 false,
2336 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2337 { RTL_TEXTENCODING_SHIFT_JIS,
2338 RTL_CONSTASCII_STRINGPARAM(""),
2339 { 0x00A0, 0x00A9, 0x2122 },
2340 3,
2341 false,
2342 false,
2343 true,
2344 false,
2345 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2346 { RTL_TEXTENCODING_MS_932,
2347 RTL_CONSTASCII_STRINGPARAM("\x81\x63"),
2348 { 0x2026 },
2349 1,
2350 false,
2351 true,
2352 true,
2353 false,
2354 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2355 { RTL_TEXTENCODING_MS_932,
2356 RTL_CONSTASCII_STRINGPARAM("\xA0\xFD\xFE\xFF"),
2357 { 0x00A0, 0x00A9, 0x2122, 0x2026 },
2358 4,
2359 false,
2360 true,
2361 false,
2362 false,
2363 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2364 { RTL_TEXTENCODING_MS_932,
2365 RTL_CONSTASCII_STRINGPARAM(""),
2366 { 0x00A0, 0x00A9, 0x2122 },
2367 3,
2368 false,
2369 false,
2370 true,
2371 false,
2372 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_IGNORE },
2373 { RTL_TEXTENCODING_APPLE_JAPANESE,
2374 RTL_CONSTASCII_STRINGPARAM("\xA0\xFD\xFE\x81\x63"),
2375 { 0x00A0, 0x00A9, 0x2122, 0x2026 },
2376 4,
2377 false,
2378 true,
2379 true,
2380 false,
2381 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2382 { RTL_TEXTENCODING_APPLE_JAPANESE,
2383 RTL_CONSTASCII_STRINGPARAM("\xFF"),
2384 { 0x2026 },
2385 1,
2386 false,
2387 true,
2388 false,
2389 false,
2390 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2391
2392 { RTL_TEXTENCODING_ADOBE_STANDARD,
2393 RTL_CONSTASCII_STRINGPARAM("\x20\x2D\xA4\xB4\xC5"),
2394 { 0x0020, 0x002D, 0x2215, 0x00B7, 0x00AF },
2395 5,
2396 false,
2397 true,
2398 true,
2399 false,
2400 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2401 { RTL_TEXTENCODING_ADOBE_STANDARD,
2402 RTL_CONSTASCII_STRINGPARAM("\x20\x2D\xA4\xB4\xC5"),
2403 { 0x00A0, 0x00AD, 0x2044, 0x2219, 0x02C9 },
2404 5,
2405 false,
2406 false,
2407 true,
2408 false,
2409 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2410
2411 { RTL_TEXTENCODING_ADOBE_SYMBOL,
2412 RTL_CONSTASCII_STRINGPARAM("\x20\x44\x57\x6D\xA4"),
2413 { 0x0020, 0x0394, 0x03A9, 0x03BC, 0x2215 },
2414 5,
2415 false,
2416 true,
2417 true,
2418 false,
2419 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2420 { RTL_TEXTENCODING_ADOBE_SYMBOL,
2421 RTL_CONSTASCII_STRINGPARAM("\x20\x44\x57\x6D\xA4"),
2422 { 0x00A0, 0x2206, 0x2126, 0x00B5, 0x2044 },
2423 5,
2424 false,
2425 false,
2426 true,
2427 false,
2428 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2429
2430 // Bug #i62310#:
2431 { RTL_TEXTENCODING_SHIFT_JIS,
2432 RTL_CONSTASCII_STRINGPARAM(
2433 "\xF0\x40\xF0\x7E\xF0\x80\xF0\xFC\xF1\x40\xF9\xFC"),
2434 { 0xE000, 0xE03E, 0xE03F, 0xE0BB, 0xE0BC, 0xE757 },
2435 6,
2436 true,
2437 true,
2438 true,
2439 false,
2440 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2441
2442 // Bug #i73103#:
2443 { RTL_TEXTENCODING_MS_1258,
2444 RTL_CONSTASCII_STRINGPARAM(
2445 "\xC0\x41\xDE\xE3\xD2\xD4\xEC\xFD\xF2"),
2446 { 0x00C0, 0x0041, 0x0303, 0x0103, 0x0309, 0x00D4, 0x0301, 0x01B0,
2447 0x0323 },
2448 9,
2449 true,
2450 true,
2451 true,
2452 false,
2453 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2454 { RTL_TEXTENCODING_MS_1258,
2455 RTL_CONSTASCII_STRINGPARAM(
2456 "\xC0\x41\xDE\xE3\xD2\xD4\xEC\xFD\xF2"),
2457 { 0x00C0, 0x00C3, 0x1EB3, 0x1ED0, 0x1EF1 },
2458 5,
2459 false,
2460 false,
2461 true,
2462 false,
2463 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR }
2464 };
2465 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
2466 doComplexCharSetTest(data[i]);
2467 }
2468 }
2469
TEST_F(Test,testComplexCut)2470 TEST_F(Test, testComplexCut) {
2471 static ComplexCharSetTest const data[]
2472 = { { RTL_TEXTENCODING_EUC_JP,
2473 RTL_CONSTASCII_STRINGPARAM("\xA1"),
2474 { 0 },
2475 0,
2476 true,
2477 true,
2478 false,
2479 false,
2480 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2481 { RTL_TEXTENCODING_EUC_JP,
2482 RTL_CONSTASCII_STRINGPARAM("\x8E"),
2483 { 0 },
2484 0,
2485 true,
2486 true,
2487 false,
2488 false,
2489 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2490 { RTL_TEXTENCODING_EUC_JP,
2491 RTL_CONSTASCII_STRINGPARAM("\x8F"),
2492 { 0 },
2493 0,
2494 true,
2495 true,
2496 false,
2497 false,
2498 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2499 { RTL_TEXTENCODING_EUC_JP,
2500 RTL_CONSTASCII_STRINGPARAM("\x8F\xA1"),
2501 { 0 },
2502 0,
2503 true,
2504 true,
2505 false,
2506 false,
2507 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2508 { RTL_TEXTENCODING_EUC_CN,
2509 RTL_CONSTASCII_STRINGPARAM("\xA1"),
2510 { 0 },
2511 0,
2512 true,
2513 true,
2514 false,
2515 false,
2516 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR } /* ,
2517 { RTL_TEXTENCODING_EUC_TW,
2518 RTL_CONSTASCII_STRINGPARAM("\xA1"),
2519 { 0 },
2520 0,
2521 true,
2522 true,
2523 false,
2524 false,
2525 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2526 { RTL_TEXTENCODING_EUC_TW,
2527 RTL_CONSTASCII_STRINGPARAM("\x8E"),
2528 { 0 },
2529 0,
2530 true,
2531 true,
2532 false,
2533 false,
2534 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2535 { RTL_TEXTENCODING_EUC_TW,
2536 RTL_CONSTASCII_STRINGPARAM("\x8E\xA1"),
2537 { 0 },
2538 0,
2539 true,
2540 true,
2541 false,
2542 false,
2543 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR },
2544 { RTL_TEXTENCODING_EUC_TW,
2545 RTL_CONSTASCII_STRINGPARAM("\x8E\xA1\xA1"),
2546 { 0 },
2547 0,
2548 true,
2549 true,
2550 false,
2551 false,
2552 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR } */ };
2553 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
2554 doComplexCharSetCutTest(data[i]);
2555 }
2556 }
2557
TEST_F(Test,testSRCBUFFERTOSMALL)2558 TEST_F(Test, testSRCBUFFERTOSMALL) {
2559 rtl_TextToUnicodeConverter cv = rtl_createTextToUnicodeConverter(
2560 RTL_TEXTENCODING_EUC_JP);
2561 OSL_ASSERT(cv != NULL);
2562 rtl_TextToUnicodeContext cx = rtl_createTextToUnicodeContext(cv);
2563 OSL_ASSERT(cx != NULL);
2564 char src = '\xA1';
2565 sal_Unicode dst[10];
2566 sal_uInt32 info;
2567 sal_Size cvt;
2568 ASSERT_EQ(
2569 sal_Size(0),
2570 rtl_convertTextToUnicode(
2571 cv, cx, &src, 1, dst, sizeof dst / sizeof (sal_Unicode),
2572 (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR |
2573 RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR |
2574 RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
2575 &info, &cvt));
2576 ASSERT_EQ(RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOSMALL, info);
2577 ASSERT_TRUE(cvt <= 1);
2578 rtl_destroyTextToUnicodeContext(cv, cx);
2579 rtl_destroyTextToUnicodeConverter(cv);
2580 }
2581
TEST_F(Test,testMime)2582 TEST_F(Test, testMime) {
2583 struct Data {
2584 char const * mime;
2585 rtl_TextEncoding encoding;
2586 bool reverse;
2587 };
2588 static Data const data[] = {
2589 { "GBK", RTL_TEXTENCODING_GBK, false },
2590 { "CP936", RTL_TEXTENCODING_GBK, false },
2591 { "MS936", RTL_TEXTENCODING_GBK, false },
2592 { "windows-936", RTL_TEXTENCODING_GBK, false },
2593
2594 { "GB18030", RTL_TEXTENCODING_GB_18030, false },
2595
2596 { "TIS-620", RTL_TEXTENCODING_TIS_620, true },
2597 { "ISO-8859-11", RTL_TEXTENCODING_TIS_620, false }, // not registered
2598
2599 { "CP874", RTL_TEXTENCODING_MS_874, false }, // not registered
2600 { "MS874", RTL_TEXTENCODING_MS_874, false }, // not registered
2601 { "windows-874", RTL_TEXTENCODING_MS_874, true }, // not registered
2602
2603 { "ISO_8859-8:1988", RTL_TEXTENCODING_ISO_8859_8, false },
2604 { "iso-ir-138", RTL_TEXTENCODING_ISO_8859_8, false },
2605 { "ISO_8859-8", RTL_TEXTENCODING_ISO_8859_8, false },
2606 { "ISO-8859-8", RTL_TEXTENCODING_ISO_8859_8, true },
2607 { "hebrew", RTL_TEXTENCODING_ISO_8859_8, false },
2608 { "csISOLatinHebrew", RTL_TEXTENCODING_ISO_8859_8, false },
2609
2610 { "windows-1255", RTL_TEXTENCODING_MS_1255, true },
2611
2612 { "IBM862", RTL_TEXTENCODING_IBM_862, true },
2613 { "cp862", RTL_TEXTENCODING_IBM_862, false },
2614 { "862", RTL_TEXTENCODING_IBM_862, false },
2615 { "csPC862LatinHebrew", RTL_TEXTENCODING_IBM_862, false },
2616
2617 { "ISO_8859-6:1987", RTL_TEXTENCODING_ISO_8859_6, false },
2618 { "iso-ir-127", RTL_TEXTENCODING_ISO_8859_6, false },
2619 { "ISO_8859-6", RTL_TEXTENCODING_ISO_8859_6, false },
2620 { "ISO-8859-6", RTL_TEXTENCODING_ISO_8859_6, true },
2621 { "ECMA-114", RTL_TEXTENCODING_ISO_8859_6, false },
2622 { "ASMO-708", RTL_TEXTENCODING_ISO_8859_6, false },
2623 { "arabic", RTL_TEXTENCODING_ISO_8859_6, false },
2624 { "csISOLatinArabic", RTL_TEXTENCODING_ISO_8859_6, false },
2625
2626 { "windows-1256", RTL_TEXTENCODING_MS_1256, true },
2627
2628 { "IBM864", RTL_TEXTENCODING_IBM_864, true },
2629 { "cp864", RTL_TEXTENCODING_IBM_864, false },
2630 { "csIBM864", RTL_TEXTENCODING_IBM_864, false },
2631
2632 { "KOI8-R", RTL_TEXTENCODING_KOI8_R, false },
2633 { "csKOI8R", RTL_TEXTENCODING_KOI8_R, false },
2634 { "koi8-r", RTL_TEXTENCODING_KOI8_R, true },
2635
2636 { "KOI8-U", RTL_TEXTENCODING_KOI8_U, true },
2637
2638 { "IBM860", RTL_TEXTENCODING_IBM_860, true },
2639 { "cp860", RTL_TEXTENCODING_IBM_860, false },
2640 { "860", RTL_TEXTENCODING_IBM_860, false },
2641 { "csIBM860", RTL_TEXTENCODING_IBM_860, false },
2642
2643 { "IBM861", RTL_TEXTENCODING_IBM_861, true },
2644 { "cp861", RTL_TEXTENCODING_IBM_861, false },
2645 { "861", RTL_TEXTENCODING_IBM_861, false },
2646 { "cp-is", RTL_TEXTENCODING_IBM_861, false },
2647 { "csIBM861", RTL_TEXTENCODING_IBM_861, false },
2648
2649 { "IBM863", RTL_TEXTENCODING_IBM_863, true },
2650 { "cp863", RTL_TEXTENCODING_IBM_863, false },
2651 { "863", RTL_TEXTENCODING_IBM_863, false },
2652 { "csIBM863", RTL_TEXTENCODING_IBM_863, false },
2653
2654 { "IBM865", RTL_TEXTENCODING_IBM_865, true },
2655 { "cp865", RTL_TEXTENCODING_IBM_865, false },
2656 { "865", RTL_TEXTENCODING_IBM_865, false },
2657 { "csIBM865", RTL_TEXTENCODING_IBM_865, false },
2658
2659 { "Latin-9", RTL_TEXTENCODING_ISO_8859_15, false },
2660
2661 { "KS_C_5601-1987", RTL_TEXTENCODING_MS_949, false },
2662 { "iso-ir-149", RTL_TEXTENCODING_MS_949, false },
2663 { "KS_C_5601-1989", RTL_TEXTENCODING_MS_949, false },
2664 { "KSC_5601", RTL_TEXTENCODING_MS_949, false },
2665 { "korean", RTL_TEXTENCODING_MS_949, false },
2666 { "csKSC56011987", RTL_TEXTENCODING_MS_949, false },
2667 { 0, RTL_TEXTENCODING_MS_949, true },
2668
2669 { "Adobe-Standard-Encoding", RTL_TEXTENCODING_ADOBE_STANDARD, false },
2670 { "csAdobeStandardEncoding", RTL_TEXTENCODING_ADOBE_STANDARD, false },
2671 { "Adobe-Symbol-Encoding", RTL_TEXTENCODING_ADOBE_SYMBOL, false },
2672 { "csHPPSMath", RTL_TEXTENCODING_ADOBE_SYMBOL, false },
2673
2674 { "PTCP154", RTL_TEXTENCODING_PT154, true },
2675 { "csPTCP154", RTL_TEXTENCODING_PT154, false },
2676 { "PT154", RTL_TEXTENCODING_PT154, false },
2677 { "CP154", RTL_TEXTENCODING_PT154, false },
2678 { "Cyrillic-Asian", RTL_TEXTENCODING_PT154, false }
2679 };
2680 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
2681 if (data[i].mime == 0) {
2682 OSL_ASSERT(data[i].reverse);
2683 ASSERT_EQ(
2684 static_cast< char const * >(0),
2685 rtl_getMimeCharsetFromTextEncoding(data[i].encoding));
2686 } else {
2687 ASSERT_EQ(
2688 data[i].encoding,
2689 rtl_getTextEncodingFromMimeCharset(data[i].mime));
2690 if (data[i].reverse) {
2691 ASSERT_EQ(
2692 rtl::OString(data[i].mime),
2693 rtl::OString(
2694 rtl_getMimeCharsetFromTextEncoding(data[i].encoding)));
2695 }
2696 }
2697 }
2698 }
2699
TEST_F(Test,testWindows)2700 TEST_F(Test, testWindows) {
2701 struct Data {
2702 sal_uInt32 codePage;
2703 rtl_TextEncoding encoding;
2704 bool reverse;
2705 };
2706 static Data const data[] = {
2707 { 437, RTL_TEXTENCODING_IBM_437, true },
2708 { 708, RTL_TEXTENCODING_ISO_8859_6, false },
2709 { 737, RTL_TEXTENCODING_IBM_737, true },
2710 { 775, RTL_TEXTENCODING_IBM_775, true },
2711 { 850, RTL_TEXTENCODING_IBM_850, true },
2712 { 852, RTL_TEXTENCODING_IBM_852, true },
2713 { 855, RTL_TEXTENCODING_IBM_855, true },
2714 { 857, RTL_TEXTENCODING_IBM_857, true },
2715 { 860, RTL_TEXTENCODING_IBM_860, true },
2716 { 861, RTL_TEXTENCODING_IBM_861, true },
2717 { 862, RTL_TEXTENCODING_IBM_862, true },
2718 { 863, RTL_TEXTENCODING_IBM_863, true },
2719 { 864, RTL_TEXTENCODING_IBM_864, true },
2720 { 865, RTL_TEXTENCODING_IBM_865, true },
2721 { 866, RTL_TEXTENCODING_IBM_866, true },
2722 { 869, RTL_TEXTENCODING_IBM_869, true },
2723 { 874, RTL_TEXTENCODING_MS_874, true },
2724 { 932, RTL_TEXTENCODING_MS_932, true },
2725 { 936, RTL_TEXTENCODING_MS_936, true },
2726 { 949, RTL_TEXTENCODING_MS_949, true },
2727 { 950, RTL_TEXTENCODING_MS_950, true },
2728 { 1250, RTL_TEXTENCODING_MS_1250, true },
2729 { 1251, RTL_TEXTENCODING_MS_1251, true },
2730 { 1252, RTL_TEXTENCODING_MS_1252, true },
2731 { 1253, RTL_TEXTENCODING_MS_1253, true },
2732 { 1254, RTL_TEXTENCODING_MS_1254, true },
2733 { 1255, RTL_TEXTENCODING_MS_1255, true },
2734 { 1256, RTL_TEXTENCODING_MS_1256, true },
2735 { 1257, RTL_TEXTENCODING_MS_1257, true },
2736 { 1258, RTL_TEXTENCODING_MS_1258, true },
2737 { 1361, RTL_TEXTENCODING_MS_1361, true },
2738 { 10000, RTL_TEXTENCODING_APPLE_ROMAN, true },
2739 { 10001, RTL_TEXTENCODING_APPLE_JAPANESE, true },
2740 { 10002, RTL_TEXTENCODING_APPLE_CHINTRAD, true },
2741 { 10003, RTL_TEXTENCODING_APPLE_KOREAN, true },
2742 { 10004, RTL_TEXTENCODING_APPLE_ARABIC, true },
2743 { 10005, RTL_TEXTENCODING_APPLE_HEBREW, true },
2744 { 10006, RTL_TEXTENCODING_APPLE_GREEK, true },
2745 { 10007, RTL_TEXTENCODING_APPLE_CYRILLIC, true },
2746 { 10008, RTL_TEXTENCODING_APPLE_CHINSIMP, true },
2747 { 10010, RTL_TEXTENCODING_APPLE_ROMANIAN, true },
2748 { 10017, RTL_TEXTENCODING_APPLE_UKRAINIAN, true },
2749 { 10029, RTL_TEXTENCODING_APPLE_CENTEURO, true },
2750 { 10079, RTL_TEXTENCODING_APPLE_ICELAND, true },
2751 { 10081, RTL_TEXTENCODING_APPLE_TURKISH, true },
2752 { 10082, RTL_TEXTENCODING_APPLE_CROATIAN, true },
2753 { 20127, RTL_TEXTENCODING_ASCII_US, true },
2754 { 20866, RTL_TEXTENCODING_KOI8_R, true },
2755 { 21866, RTL_TEXTENCODING_KOI8_U, true },
2756 { 28591, RTL_TEXTENCODING_ISO_8859_1, true },
2757 { 28592, RTL_TEXTENCODING_ISO_8859_2, true },
2758 { 28593, RTL_TEXTENCODING_ISO_8859_3, true },
2759 { 28594, RTL_TEXTENCODING_ISO_8859_4, true },
2760 { 28595, RTL_TEXTENCODING_ISO_8859_5, true },
2761 { 28596, RTL_TEXTENCODING_ISO_8859_6, true },
2762 { 28597, RTL_TEXTENCODING_ISO_8859_7, true },
2763 { 28598, RTL_TEXTENCODING_ISO_8859_8, true },
2764 { 28599, RTL_TEXTENCODING_ISO_8859_9, true },
2765 { 28605, RTL_TEXTENCODING_ISO_8859_15, true },
2766 { 50220, RTL_TEXTENCODING_ISO_2022_JP, true },
2767 { 50225, RTL_TEXTENCODING_ISO_2022_KR, true },
2768 { 51932, RTL_TEXTENCODING_EUC_JP, true },
2769 { 51936, RTL_TEXTENCODING_EUC_CN, true },
2770 { 51949, RTL_TEXTENCODING_EUC_KR, true },
2771 { 65000, RTL_TEXTENCODING_UTF7, true },
2772 { 65001, RTL_TEXTENCODING_UTF8, true },
2773 { 1200, RTL_TEXTENCODING_DONTKNOW, false }, // UTF_16LE
2774 { 1201, RTL_TEXTENCODING_DONTKNOW, false }, // UTF_16LE
2775 { 0, RTL_TEXTENCODING_DONTKNOW, true },
2776 { 0, RTL_TEXTENCODING_UCS4, true },
2777 { 0, RTL_TEXTENCODING_UCS2, true },
2778 { 0, RTL_TEXTENCODING_ISCII_DEVANAGARI, true }
2779 };
2780 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
2781 OSL_ASSERT(data[i].codePage != 0 || data[i].reverse);
2782 if (data[i].codePage != 0) {
2783 ASSERT_EQ(
2784 data[i].encoding,
2785 rtl_getTextEncodingFromWindowsCodePage(data[i].codePage));
2786 }
2787 if (data[i].reverse) {
2788 ASSERT_EQ(
2789 data[i].codePage,
2790 rtl_getWindowsCodePageFromTextEncoding(data[i].encoding));
2791 }
2792 }
2793 }
2794
TEST_F(Test,testInfo)2795 TEST_F(Test, testInfo) {
2796 struct Data {
2797 rtl_TextEncoding encoding;
2798 sal_uInt32 flag;
2799 bool value;
2800 };
2801 static Data const data[] = {
2802 { RTL_TEXTENCODING_APPLE_CHINTRAD, RTL_TEXTENCODING_INFO_ASCII, false },
2803 { RTL_TEXTENCODING_APPLE_JAPANESE, RTL_TEXTENCODING_INFO_ASCII, false },
2804 { RTL_TEXTENCODING_APPLE_KOREAN, RTL_TEXTENCODING_INFO_ASCII, false },
2805 { RTL_TEXTENCODING_BIG5, RTL_TEXTENCODING_INFO_ASCII, false },
2806 { RTL_TEXTENCODING_BIG5_HKSCS, RTL_TEXTENCODING_INFO_ASCII, false },
2807 { RTL_TEXTENCODING_EUC_CN, RTL_TEXTENCODING_INFO_ASCII, true },
2808 { RTL_TEXTENCODING_EUC_JP, RTL_TEXTENCODING_INFO_ASCII, true },
2809 { RTL_TEXTENCODING_EUC_KR, RTL_TEXTENCODING_INFO_ASCII, true },
2810 { RTL_TEXTENCODING_EUC_TW, RTL_TEXTENCODING_INFO_ASCII, true },
2811 { RTL_TEXTENCODING_GBK, RTL_TEXTENCODING_INFO_ASCII, false },
2812 { RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_INFO_ASCII, false },
2813 { RTL_TEXTENCODING_GB_18030, RTL_TEXTENCODING_INFO_UNICODE, true },
2814 { RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_INFO_CONTEXT, true },
2815 { RTL_TEXTENCODING_ISO_2022_CN, RTL_TEXTENCODING_INFO_ASCII, false },
2816 { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_CONTEXT, true },
2817 { RTL_TEXTENCODING_ISO_2022_JP, RTL_TEXTENCODING_INFO_ASCII, false },
2818 { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_CONTEXT, true },
2819 { RTL_TEXTENCODING_ISO_2022_KR, RTL_TEXTENCODING_INFO_ASCII, false },
2820 { RTL_TEXTENCODING_MS_1361, RTL_TEXTENCODING_INFO_ASCII, false },
2821 { RTL_TEXTENCODING_MS_874, RTL_TEXTENCODING_INFO_ASCII, true },
2822 { RTL_TEXTENCODING_MS_932, RTL_TEXTENCODING_INFO_ASCII, false },
2823 { RTL_TEXTENCODING_MS_936, RTL_TEXTENCODING_INFO_ASCII, false },
2824 { RTL_TEXTENCODING_MS_949, RTL_TEXTENCODING_INFO_ASCII, false },
2825 { RTL_TEXTENCODING_MS_950, RTL_TEXTENCODING_INFO_ASCII, false },
2826 { RTL_TEXTENCODING_SHIFT_JIS, RTL_TEXTENCODING_INFO_ASCII, false },
2827 { RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_INFO_ASCII, true },
2828 { RTL_TEXTENCODING_KOI8_R, RTL_TEXTENCODING_INFO_MIME, true },
2829 { RTL_TEXTENCODING_KOI8_U, RTL_TEXTENCODING_INFO_ASCII, true },
2830 { RTL_TEXTENCODING_KOI8_U, RTL_TEXTENCODING_INFO_MIME, true },
2831 { RTL_TEXTENCODING_IBM_860, RTL_TEXTENCODING_INFO_MIME, true },
2832 { RTL_TEXTENCODING_IBM_861, RTL_TEXTENCODING_INFO_MIME, true },
2833 { RTL_TEXTENCODING_IBM_863, RTL_TEXTENCODING_INFO_MIME, true },
2834 { RTL_TEXTENCODING_IBM_865, RTL_TEXTENCODING_INFO_MIME, true },
2835 { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_ASCII, true },
2836 { RTL_TEXTENCODING_ISCII_DEVANAGARI, RTL_TEXTENCODING_INFO_MIME, false },
2837 { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_ASCII, false },
2838 { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_MIME, true },
2839 { RTL_TEXTENCODING_ADOBE_STANDARD, RTL_TEXTENCODING_INFO_SYMBOL, false },
2840 { RTL_TEXTENCODING_ADOBE_SYMBOL, RTL_TEXTENCODING_INFO_ASCII, false },
2841 { RTL_TEXTENCODING_ADOBE_SYMBOL, RTL_TEXTENCODING_INFO_MIME, true },
2842 { RTL_TEXTENCODING_ADOBE_SYMBOL, RTL_TEXTENCODING_INFO_SYMBOL, true },
2843 { RTL_TEXTENCODING_PT154, RTL_TEXTENCODING_INFO_ASCII, true },
2844 { RTL_TEXTENCODING_PT154, RTL_TEXTENCODING_INFO_MIME, true }
2845 };
2846 for (std::size_t i = 0; i < sizeof data / sizeof data[0]; ++i) {
2847 rtl_TextEncodingInfo info;
2848 info.StructSize = sizeof info;
2849 ASSERT_TRUE(rtl_getTextEncodingInfo(data[i].encoding, &info));
2850 ASSERT_EQ(data[i].value, ((info.Flags & data[i].flag) != 0));
2851 }
2852 }
2853
2854
2855 }
2856
main(int argc,char ** argv)2857 int main(int argc, char **argv)
2858 {
2859 ::testing::InitGoogleTest(&argc, argv);
2860 return RUN_ALL_TESTS();
2861 }
2862