|
1 /* |
|
2 * Copyright (c) 1256 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <convdata.h> |
|
23 #include <convgeneratedcpp.h> |
|
24 |
|
25 #define ARRAY_LENGTH(aArray) (sizeof(aArray)/sizeof((aArray)[0])) |
|
26 |
|
27 #pragma warning (disable: 4049) // compiler limit : terminating line number emission |
|
28 |
|
29 _LIT8(KLit8ReplacementForUnconvertibleUnicodeCharacters, "\x1a"); |
|
30 |
|
31 GLDEF_C const TDesC8& ReplacementForUnconvertibleUnicodeCharacters_internal() |
|
32 { |
|
33 return KLit8ReplacementForUnconvertibleUnicodeCharacters; |
|
34 } |
|
35 |
|
36 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry keyedTable1616_foreignToUnicode_1[]= |
|
37 { |
|
38 { |
|
39 0x80, |
|
40 0x20ac |
|
41 }, |
|
42 { |
|
43 0x81, |
|
44 0x067e |
|
45 }, |
|
46 { |
|
47 0x82, |
|
48 0x201a |
|
49 }, |
|
50 { |
|
51 0x83, |
|
52 0x0192 |
|
53 }, |
|
54 { |
|
55 0x84, |
|
56 0x201e |
|
57 }, |
|
58 { |
|
59 0x85, |
|
60 0x2026 |
|
61 }, |
|
62 { |
|
63 0x86, |
|
64 0x2020 |
|
65 }, |
|
66 { |
|
67 0x87, |
|
68 0x2021 |
|
69 }, |
|
70 { |
|
71 0x88, |
|
72 0x02c6 |
|
73 }, |
|
74 { |
|
75 0x89, |
|
76 0x2030 |
|
77 }, |
|
78 { |
|
79 0x8a, |
|
80 0x0679 |
|
81 }, |
|
82 { |
|
83 0x8b, |
|
84 0x2039 |
|
85 }, |
|
86 { |
|
87 0x8c, |
|
88 0x0152 |
|
89 }, |
|
90 { |
|
91 0x8d, |
|
92 0x0686 |
|
93 }, |
|
94 { |
|
95 0x8e, |
|
96 0x0698 |
|
97 }, |
|
98 { |
|
99 0x8f, |
|
100 0x0688 |
|
101 }, |
|
102 { |
|
103 0x90, |
|
104 0x06af |
|
105 }, |
|
106 { |
|
107 0x91, |
|
108 0x2018 |
|
109 }, |
|
110 { |
|
111 0x92, |
|
112 0x2019 |
|
113 }, |
|
114 { |
|
115 0x93, |
|
116 0x201c |
|
117 }, |
|
118 { |
|
119 0x94, |
|
120 0x201d |
|
121 }, |
|
122 { |
|
123 0x95, |
|
124 0x2022 |
|
125 }, |
|
126 { |
|
127 0x96, |
|
128 0x2013 |
|
129 }, |
|
130 { |
|
131 0x97, |
|
132 0x2014 |
|
133 }, |
|
134 { |
|
135 0x98, |
|
136 0x06a9 |
|
137 }, |
|
138 { |
|
139 0x99, |
|
140 0x2122 |
|
141 }, |
|
142 { |
|
143 0x9a, |
|
144 0x0691 |
|
145 }, |
|
146 { |
|
147 0x9b, |
|
148 0x203a |
|
149 }, |
|
150 { |
|
151 0x9c, |
|
152 0x0153 |
|
153 }, |
|
154 { |
|
155 0x9d, |
|
156 0x200c |
|
157 }, |
|
158 { |
|
159 0x9e, |
|
160 0x200d |
|
161 }, |
|
162 { |
|
163 0x9f, |
|
164 0x06ba |
|
165 }, |
|
166 { |
|
167 0xa0, |
|
168 0x00a0 |
|
169 }, |
|
170 { |
|
171 0xa1, |
|
172 0x060c |
|
173 }, |
|
174 { |
|
175 0xa2, |
|
176 0x00a2 |
|
177 }, |
|
178 { |
|
179 0xa3, |
|
180 0x00a3 |
|
181 }, |
|
182 { |
|
183 0xa4, |
|
184 0x00a4 |
|
185 }, |
|
186 { |
|
187 0xa5, |
|
188 0x00a5 |
|
189 }, |
|
190 { |
|
191 0xa6, |
|
192 0x00a6 |
|
193 }, |
|
194 { |
|
195 0xa7, |
|
196 0x00a7 |
|
197 }, |
|
198 { |
|
199 0xa8, |
|
200 0x00a8 |
|
201 }, |
|
202 { |
|
203 0xa9, |
|
204 0x00a9 |
|
205 }, |
|
206 { |
|
207 0xaa, |
|
208 0x06be |
|
209 }, |
|
210 { |
|
211 0xba, |
|
212 0x061b |
|
213 }, |
|
214 { |
|
215 0xbb, |
|
216 0x00bb |
|
217 }, |
|
218 { |
|
219 0xbc, |
|
220 0x00bc |
|
221 }, |
|
222 { |
|
223 0xbd, |
|
224 0x00bd |
|
225 }, |
|
226 { |
|
227 0xbe, |
|
228 0x00be |
|
229 }, |
|
230 { |
|
231 0xbf, |
|
232 0x061f |
|
233 }, |
|
234 { |
|
235 0xc0, |
|
236 0x06c1 |
|
237 }, |
|
238 { |
|
239 0xd7, |
|
240 0x00d7 |
|
241 }, |
|
242 { |
|
243 0xd8, |
|
244 0x0637 |
|
245 }, |
|
246 { |
|
247 0xd9, |
|
248 0x0638 |
|
249 }, |
|
250 { |
|
251 0xda, |
|
252 0x0639 |
|
253 }, |
|
254 { |
|
255 0xdb, |
|
256 0x063a |
|
257 }, |
|
258 { |
|
259 0xdc, |
|
260 0x0640 |
|
261 }, |
|
262 { |
|
263 0xdd, |
|
264 0x0641 |
|
265 }, |
|
266 { |
|
267 0xde, |
|
268 0x0642 |
|
269 }, |
|
270 { |
|
271 0xdf, |
|
272 0x0643 |
|
273 }, |
|
274 { |
|
275 0xe0, |
|
276 0x00e0 |
|
277 }, |
|
278 { |
|
279 0xe1, |
|
280 0x0644 |
|
281 }, |
|
282 { |
|
283 0xe2, |
|
284 0x00e2 |
|
285 }, |
|
286 { |
|
287 0xe3, |
|
288 0x0645 |
|
289 }, |
|
290 { |
|
291 0xe4, |
|
292 0x0646 |
|
293 }, |
|
294 { |
|
295 0xe5, |
|
296 0x0647 |
|
297 }, |
|
298 { |
|
299 0xe6, |
|
300 0x0648 |
|
301 }, |
|
302 { |
|
303 0xe7, |
|
304 0x00e7 |
|
305 }, |
|
306 { |
|
307 0xe8, |
|
308 0x00e8 |
|
309 }, |
|
310 { |
|
311 0xe9, |
|
312 0x00e9 |
|
313 }, |
|
314 { |
|
315 0xea, |
|
316 0x00ea |
|
317 }, |
|
318 { |
|
319 0xeb, |
|
320 0x00eb |
|
321 }, |
|
322 { |
|
323 0xec, |
|
324 0x0649 |
|
325 }, |
|
326 { |
|
327 0xed, |
|
328 0x064a |
|
329 }, |
|
330 { |
|
331 0xee, |
|
332 0x00ee |
|
333 }, |
|
334 { |
|
335 0xef, |
|
336 0x00ef |
|
337 }, |
|
338 { |
|
339 0xf0, |
|
340 0x064b |
|
341 }, |
|
342 { |
|
343 0xf1, |
|
344 0x064c |
|
345 }, |
|
346 { |
|
347 0xf2, |
|
348 0x064d |
|
349 }, |
|
350 { |
|
351 0xf3, |
|
352 0x064e |
|
353 }, |
|
354 { |
|
355 0xf4, |
|
356 0x00f4 |
|
357 }, |
|
358 { |
|
359 0xf5, |
|
360 0x064f |
|
361 }, |
|
362 { |
|
363 0xf6, |
|
364 0x0650 |
|
365 }, |
|
366 { |
|
367 0xf7, |
|
368 0x00f7 |
|
369 }, |
|
370 { |
|
371 0xf8, |
|
372 0x0651 |
|
373 }, |
|
374 { |
|
375 0xf9, |
|
376 0x00f9 |
|
377 }, |
|
378 { |
|
379 0xfa, |
|
380 0x0652 |
|
381 }, |
|
382 { |
|
383 0xfb, |
|
384 0x00fb |
|
385 }, |
|
386 { |
|
387 0xfc, |
|
388 0x00fc |
|
389 }, |
|
390 { |
|
391 0xfd, |
|
392 0x200e |
|
393 }, |
|
394 { |
|
395 0xfe, |
|
396 0x200f |
|
397 }, |
|
398 { |
|
399 0xff, |
|
400 0x06d2 |
|
401 } |
|
402 }; |
|
403 |
|
404 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry keyedTable1616_unicodeToForeign_1[]= |
|
405 { |
|
406 { |
|
407 0x00a0, |
|
408 0xa0 |
|
409 }, |
|
410 { |
|
411 0x00bb, |
|
412 0xbb |
|
413 }, |
|
414 { |
|
415 0x00bc, |
|
416 0xbc |
|
417 }, |
|
418 { |
|
419 0x00bd, |
|
420 0xbd |
|
421 }, |
|
422 { |
|
423 0x00be, |
|
424 0xbe |
|
425 }, |
|
426 { |
|
427 0x00d7, |
|
428 0xd7 |
|
429 }, |
|
430 { |
|
431 0x00e0, |
|
432 0xe0 |
|
433 }, |
|
434 { |
|
435 0x00e2, |
|
436 0xe2 |
|
437 }, |
|
438 { |
|
439 0x00e7, |
|
440 0xe7 |
|
441 }, |
|
442 { |
|
443 0x00e8, |
|
444 0xe8 |
|
445 }, |
|
446 { |
|
447 0x00e9, |
|
448 0xe9 |
|
449 }, |
|
450 { |
|
451 0x00ea, |
|
452 0xea |
|
453 }, |
|
454 { |
|
455 0x00eb, |
|
456 0xeb |
|
457 }, |
|
458 { |
|
459 0x00ee, |
|
460 0xee |
|
461 }, |
|
462 { |
|
463 0x00ef, |
|
464 0xef |
|
465 }, |
|
466 { |
|
467 0x00f4, |
|
468 0xf4 |
|
469 }, |
|
470 { |
|
471 0x00f7, |
|
472 0xf7 |
|
473 }, |
|
474 { |
|
475 0x00f9, |
|
476 0xf9 |
|
477 }, |
|
478 { |
|
479 0x00fb, |
|
480 0xfb |
|
481 }, |
|
482 { |
|
483 0x00fc, |
|
484 0xfc |
|
485 }, |
|
486 { |
|
487 0x0152, |
|
488 0x8c |
|
489 }, |
|
490 { |
|
491 0x0153, |
|
492 0x9c |
|
493 }, |
|
494 { |
|
495 0x0192, |
|
496 0x83 |
|
497 }, |
|
498 { |
|
499 0x02c6, |
|
500 0x88 |
|
501 }, |
|
502 { |
|
503 0x060c, |
|
504 0xa1 |
|
505 }, |
|
506 { |
|
507 0x061b, |
|
508 0xba |
|
509 }, |
|
510 { |
|
511 0x061f, |
|
512 0xbf |
|
513 }, |
|
514 { |
|
515 0x0637, |
|
516 0xd8 |
|
517 }, |
|
518 { |
|
519 0x0638, |
|
520 0xd9 |
|
521 }, |
|
522 { |
|
523 0x0639, |
|
524 0xda |
|
525 }, |
|
526 { |
|
527 0x063a, |
|
528 0xdb |
|
529 }, |
|
530 { |
|
531 0x0640, |
|
532 0xdc |
|
533 }, |
|
534 { |
|
535 0x0641, |
|
536 0xdd |
|
537 }, |
|
538 { |
|
539 0x0642, |
|
540 0xde |
|
541 }, |
|
542 { |
|
543 0x0643, |
|
544 0xdf |
|
545 }, |
|
546 { |
|
547 0x0644, |
|
548 0xe1 |
|
549 }, |
|
550 { |
|
551 0x0645, |
|
552 0xe3 |
|
553 }, |
|
554 { |
|
555 0x0646, |
|
556 0xe4 |
|
557 }, |
|
558 { |
|
559 0x0647, |
|
560 0xe5 |
|
561 }, |
|
562 { |
|
563 0x0648, |
|
564 0xe6 |
|
565 }, |
|
566 { |
|
567 0x0649, |
|
568 0xec |
|
569 }, |
|
570 { |
|
571 0x064a, |
|
572 0xed |
|
573 }, |
|
574 { |
|
575 0x064b, |
|
576 0xf0 |
|
577 }, |
|
578 { |
|
579 0x064c, |
|
580 0xf1 |
|
581 }, |
|
582 { |
|
583 0x064d, |
|
584 0xf2 |
|
585 }, |
|
586 { |
|
587 0x064e, |
|
588 0xf3 |
|
589 }, |
|
590 { |
|
591 0x064f, |
|
592 0xf5 |
|
593 }, |
|
594 { |
|
595 0x0650, |
|
596 0xf6 |
|
597 }, |
|
598 { |
|
599 0x0651, |
|
600 0xf8 |
|
601 }, |
|
602 { |
|
603 0x0652, |
|
604 0xfa |
|
605 }, |
|
606 { |
|
607 0x0679, |
|
608 0x8a |
|
609 }, |
|
610 { |
|
611 0x067e, |
|
612 0x81 |
|
613 }, |
|
614 { |
|
615 0x0686, |
|
616 0x8d |
|
617 }, |
|
618 { |
|
619 0x0688, |
|
620 0x8f |
|
621 }, |
|
622 { |
|
623 0x0691, |
|
624 0x9a |
|
625 }, |
|
626 { |
|
627 0x0698, |
|
628 0x8e |
|
629 }, |
|
630 { |
|
631 0x06a9, |
|
632 0x98 |
|
633 }, |
|
634 { |
|
635 0x06af, |
|
636 0x90 |
|
637 }, |
|
638 { |
|
639 0x06ba, |
|
640 0x9f |
|
641 }, |
|
642 { |
|
643 0x06be, |
|
644 0xaa |
|
645 }, |
|
646 { |
|
647 0x06c1, |
|
648 0xc0 |
|
649 }, |
|
650 { |
|
651 0x06d2, |
|
652 0xff |
|
653 }, |
|
654 { |
|
655 0x200c, |
|
656 0x9d |
|
657 }, |
|
658 { |
|
659 0x200d, |
|
660 0x9e |
|
661 }, |
|
662 { |
|
663 0x200e, |
|
664 0xfd |
|
665 }, |
|
666 { |
|
667 0x200f, |
|
668 0xfe |
|
669 }, |
|
670 { |
|
671 0x2013, |
|
672 0x96 |
|
673 }, |
|
674 { |
|
675 0x2014, |
|
676 0x97 |
|
677 }, |
|
678 { |
|
679 0x2018, |
|
680 0x91 |
|
681 }, |
|
682 { |
|
683 0x2019, |
|
684 0x92 |
|
685 }, |
|
686 { |
|
687 0x201a, |
|
688 0x82 |
|
689 }, |
|
690 { |
|
691 0x201c, |
|
692 0x93 |
|
693 }, |
|
694 { |
|
695 0x201d, |
|
696 0x94 |
|
697 }, |
|
698 { |
|
699 0x201e, |
|
700 0x84 |
|
701 }, |
|
702 { |
|
703 0x2020, |
|
704 0x86 |
|
705 }, |
|
706 { |
|
707 0x2021, |
|
708 0x87 |
|
709 }, |
|
710 { |
|
711 0x2022, |
|
712 0x95 |
|
713 }, |
|
714 { |
|
715 0x2026, |
|
716 0x85 |
|
717 }, |
|
718 { |
|
719 0x2030, |
|
720 0x89 |
|
721 }, |
|
722 { |
|
723 0x2039, |
|
724 0x8b |
|
725 }, |
|
726 { |
|
727 0x203a, |
|
728 0x9b |
|
729 }, |
|
730 { |
|
731 0x20ac, |
|
732 0x80 |
|
733 }, |
|
734 { |
|
735 0x2122, |
|
736 0x99 |
|
737 } |
|
738 }; |
|
739 |
|
740 LOCAL_D const SCnvConversionData::SVariableByteData::SRange foreignVariableByteDataRanges[]= |
|
741 { |
|
742 { |
|
743 0x00, |
|
744 0xff, |
|
745 0, |
|
746 0 |
|
747 } |
|
748 }; |
|
749 |
|
750 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange foreignToUnicodeDataRanges[]= |
|
751 { |
|
752 { |
|
753 0x00, |
|
754 0x7f, |
|
755 SCnvConversionData::SOneDirectionData::SRange::EDirect, |
|
756 0, |
|
757 0, |
|
758 { |
|
759 0, |
|
760 0 |
|
761 } |
|
762 }, |
|
763 { |
|
764 0xab, |
|
765 0xb9, |
|
766 SCnvConversionData::SOneDirectionData::SRange::EDirect, |
|
767 0, |
|
768 0, |
|
769 { |
|
770 0, |
|
771 0 |
|
772 } |
|
773 }, |
|
774 { |
|
775 0xc1, |
|
776 0xd6, |
|
777 SCnvConversionData::SOneDirectionData::SRange::EOffset, |
|
778 0, |
|
779 0, |
|
780 { |
|
781 STATIC_CAST(TUint, 1376), |
|
782 0 |
|
783 } |
|
784 }, |
|
785 { |
|
786 0x80, |
|
787 0xff, |
|
788 SCnvConversionData::SOneDirectionData::SRange::EKeyedTable1616, |
|
789 0, |
|
790 0, |
|
791 { |
|
792 STATIC_CAST(TUint, ARRAY_LENGTH(keyedTable1616_foreignToUnicode_1)), |
|
793 REINTERPRET_CAST(TUint, CONST_CAST( SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry*, keyedTable1616_foreignToUnicode_1)) |
|
794 } |
|
795 } |
|
796 }; |
|
797 |
|
798 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange unicodeToForeignDataRanges[]= |
|
799 { |
|
800 { |
|
801 0x0000, |
|
802 0x007f, |
|
803 SCnvConversionData::SOneDirectionData::SRange::EDirect, |
|
804 1, |
|
805 0, |
|
806 { |
|
807 0, |
|
808 0 |
|
809 } |
|
810 }, |
|
811 { |
|
812 0x00a2, |
|
813 0x00a9, |
|
814 SCnvConversionData::SOneDirectionData::SRange::EDirect, |
|
815 1, |
|
816 0, |
|
817 { |
|
818 0, |
|
819 0 |
|
820 } |
|
821 }, |
|
822 { |
|
823 0x00ab, |
|
824 0x00b9, |
|
825 SCnvConversionData::SOneDirectionData::SRange::EDirect, |
|
826 1, |
|
827 0, |
|
828 { |
|
829 0, |
|
830 0 |
|
831 } |
|
832 }, |
|
833 { |
|
834 0x0621, |
|
835 0x0636, |
|
836 SCnvConversionData::SOneDirectionData::SRange::EOffset, |
|
837 1, |
|
838 0, |
|
839 { |
|
840 STATIC_CAST(TUint, -1376), |
|
841 0 |
|
842 } |
|
843 }, |
|
844 { |
|
845 0x00a0, |
|
846 0x2122, |
|
847 SCnvConversionData::SOneDirectionData::SRange::EKeyedTable1616, |
|
848 1, |
|
849 0, |
|
850 { |
|
851 STATIC_CAST(TUint, ARRAY_LENGTH(keyedTable1616_unicodeToForeign_1)), |
|
852 REINTERPRET_CAST(TUint, CONST_CAST( SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry*, keyedTable1616_unicodeToForeign_1)) |
|
853 } |
|
854 } |
|
855 }; |
|
856 |
|
857 GLDEF_D const SCnvConversionData conversionData= |
|
858 { |
|
859 SCnvConversionData::EFixedBigEndian, |
|
860 { |
|
861 ARRAY_LENGTH(foreignVariableByteDataRanges), |
|
862 foreignVariableByteDataRanges |
|
863 }, |
|
864 { |
|
865 ARRAY_LENGTH(foreignToUnicodeDataRanges), |
|
866 foreignToUnicodeDataRanges |
|
867 }, |
|
868 { |
|
869 ARRAY_LENGTH(unicodeToForeignDataRanges), |
|
870 unicodeToForeignDataRanges |
|
871 }, |
|
872 NULL, |
|
873 NULL |
|
874 }; |
|
875 |