charconvfw/Charconvplugin/src/G_KOI8R.cpp
changeset 0 1fb32624e06b
child 16 56cd22a7a1cb
equal deleted inserted replaced
-1:000000000000 0:1fb32624e06b
       
     1 /*
       
     2 * Copyright (c) 2004 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 "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 TUint16 keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_1[]=
       
    37 	{
       
    38 	0x2500,
       
    39 	0x2502,
       
    40 	0x250c,
       
    41 	0x2510,
       
    42 	0x2514,
       
    43 	0x2518,
       
    44 	0x251c,
       
    45 	0x2524,
       
    46 	0x252c,
       
    47 	0x2534,
       
    48 	0x253c,
       
    49 	0x2580,
       
    50 	0x2584,
       
    51 	0x2588,
       
    52 	0x258c,
       
    53 	0x2590,
       
    54 	0x2591,
       
    55 	0x2592,
       
    56 	0x2593,
       
    57 	0x2320,
       
    58 	0x25a0,
       
    59 	0x2219,
       
    60 	0x221a,
       
    61 	0x2248,
       
    62 	0x2264,
       
    63 	0x2265
       
    64 	};
       
    65 
       
    66 LOCAL_D const TUint16 keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_2[]=
       
    67 	{
       
    68 	0x2321,
       
    69 	0x00b0,
       
    70 	0x00b2,
       
    71 	0x00b7,
       
    72 	0x00f7,
       
    73 	0x2550,
       
    74 	0x2551,
       
    75 	0x2552,
       
    76 	0x0451,
       
    77 	0x2553,
       
    78 	0x2554,
       
    79 	0x2555,
       
    80 	0x2556,
       
    81 	0x2557,
       
    82 	0x2558,
       
    83 	0x2559,
       
    84 	0x255a,
       
    85 	0x255b,
       
    86 	0x255c,
       
    87 	0x255d,
       
    88 	0x255e,
       
    89 	0x255f,
       
    90 	0x2560,
       
    91 	0x2561,
       
    92 	0x0401,
       
    93 	0x2562,
       
    94 	0x2563,
       
    95 	0x2564,
       
    96 	0x2565,
       
    97 	0x2566,
       
    98 	0x2567,
       
    99 	0x2568,
       
   100 	0x2569,
       
   101 	0x256a,
       
   102 	0x256b,
       
   103 	0x256c
       
   104 	};
       
   105 
       
   106 LOCAL_D const TUint16 keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_3[]=
       
   107 	{
       
   108 	0x044e,
       
   109 	0x0430,
       
   110 	0x0431,
       
   111 	0x0446,
       
   112 	0x0434,
       
   113 	0x0435,
       
   114 	0x0444,
       
   115 	0x0433,
       
   116 	0x0445,
       
   117 	0x0438,
       
   118 	0x0439,
       
   119 	0x043a,
       
   120 	0x043b,
       
   121 	0x043c,
       
   122 	0x043d,
       
   123 	0x043e,
       
   124 	0x043f,
       
   125 	0x044f,
       
   126 	0x0440,
       
   127 	0x0441,
       
   128 	0x0442,
       
   129 	0x0443,
       
   130 	0x0436,
       
   131 	0x0432,
       
   132 	0x044c,
       
   133 	0x044b,
       
   134 	0x0437,
       
   135 	0x0448,
       
   136 	0x044d,
       
   137 	0x0449,
       
   138 	0x0447,
       
   139 	0x044a,
       
   140 	0x042e,
       
   141 	0x0410,
       
   142 	0x0411,
       
   143 	0x0426,
       
   144 	0x0414,
       
   145 	0x0415,
       
   146 	0x0424,
       
   147 	0x0413,
       
   148 	0x0425,
       
   149 	0x0418,
       
   150 	0x0419,
       
   151 	0x041a,
       
   152 	0x041b,
       
   153 	0x041c,
       
   154 	0x041d,
       
   155 	0x041e,
       
   156 	0x041f,
       
   157 	0x042f,
       
   158 	0x0420,
       
   159 	0x0421,
       
   160 	0x0422,
       
   161 	0x0423,
       
   162 	0x0416,
       
   163 	0x0412,
       
   164 	0x042c,
       
   165 	0x042b,
       
   166 	0x0417,
       
   167 	0x0428,
       
   168 	0x042d,
       
   169 	0x0429,
       
   170 	0x0427,
       
   171 	0x042a
       
   172 	};
       
   173 
       
   174 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable16OfIndexedTables16::SKeyedEntry keyedTables16OfIndexedTables16_keyedEntries_foreignToUnicode_1[]=
       
   175 	{
       
   176 		{
       
   177 		0x80,
       
   178 		0x99,
       
   179 		keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_1
       
   180 		},
       
   181 		{
       
   182 		0x9b,
       
   183 		0xbe,
       
   184 		keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_2
       
   185 		},
       
   186 		{
       
   187 		0xc0,
       
   188 		0xff,
       
   189 		keyedTables16OfIndexedTables16_indexedEntries_foreignToUnicode_3
       
   190 		}
       
   191 	};
       
   192 
       
   193 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry keyedTable1616_unicodeToForeign_1[]=
       
   194 	{
       
   195 		{
       
   196 		0x00b0,
       
   197 		0x9c
       
   198 		},
       
   199 		{
       
   200 		0x00b2,
       
   201 		0x9d
       
   202 		},
       
   203 		{
       
   204 		0x00b7,
       
   205 		0x9e
       
   206 		},
       
   207 		{
       
   208 		0x00f7,
       
   209 		0x9f
       
   210 		},
       
   211 		{
       
   212 		0x0401,
       
   213 		0xb3
       
   214 		},
       
   215 		{
       
   216 		0x0410,
       
   217 		0xe1
       
   218 		},
       
   219 		{
       
   220 		0x0411,
       
   221 		0xe2
       
   222 		},
       
   223 		{
       
   224 		0x0412,
       
   225 		0xf7
       
   226 		},
       
   227 		{
       
   228 		0x0413,
       
   229 		0xe7
       
   230 		},
       
   231 		{
       
   232 		0x0414,
       
   233 		0xe4
       
   234 		},
       
   235 		{
       
   236 		0x0415,
       
   237 		0xe5
       
   238 		},
       
   239 		{
       
   240 		0x0416,
       
   241 		0xf6
       
   242 		},
       
   243 		{
       
   244 		0x0417,
       
   245 		0xfa
       
   246 		},
       
   247 		{
       
   248 		0x0418,
       
   249 		0xe9
       
   250 		},
       
   251 		{
       
   252 		0x0419,
       
   253 		0xea
       
   254 		},
       
   255 		{
       
   256 		0x041a,
       
   257 		0xeb
       
   258 		},
       
   259 		{
       
   260 		0x041b,
       
   261 		0xec
       
   262 		},
       
   263 		{
       
   264 		0x041c,
       
   265 		0xed
       
   266 		},
       
   267 		{
       
   268 		0x041d,
       
   269 		0xee
       
   270 		},
       
   271 		{
       
   272 		0x041e,
       
   273 		0xef
       
   274 		},
       
   275 		{
       
   276 		0x041f,
       
   277 		0xf0
       
   278 		},
       
   279 		{
       
   280 		0x0420,
       
   281 		0xf2
       
   282 		},
       
   283 		{
       
   284 		0x0421,
       
   285 		0xf3
       
   286 		},
       
   287 		{
       
   288 		0x0422,
       
   289 		0xf4
       
   290 		},
       
   291 		{
       
   292 		0x0423,
       
   293 		0xf5
       
   294 		},
       
   295 		{
       
   296 		0x0424,
       
   297 		0xe6
       
   298 		},
       
   299 		{
       
   300 		0x0425,
       
   301 		0xe8
       
   302 		},
       
   303 		{
       
   304 		0x0426,
       
   305 		0xe3
       
   306 		},
       
   307 		{
       
   308 		0x0427,
       
   309 		0xfe
       
   310 		},
       
   311 		{
       
   312 		0x0428,
       
   313 		0xfb
       
   314 		},
       
   315 		{
       
   316 		0x0429,
       
   317 		0xfd
       
   318 		},
       
   319 		{
       
   320 		0x042a,
       
   321 		0xff
       
   322 		},
       
   323 		{
       
   324 		0x042b,
       
   325 		0xf9
       
   326 		},
       
   327 		{
       
   328 		0x042c,
       
   329 		0xf8
       
   330 		},
       
   331 		{
       
   332 		0x042d,
       
   333 		0xfc
       
   334 		},
       
   335 		{
       
   336 		0x042e,
       
   337 		0xe0
       
   338 		},
       
   339 		{
       
   340 		0x042f,
       
   341 		0xf1
       
   342 		},
       
   343 		{
       
   344 		0x0430,
       
   345 		0xc1
       
   346 		},
       
   347 		{
       
   348 		0x0431,
       
   349 		0xc2
       
   350 		},
       
   351 		{
       
   352 		0x0432,
       
   353 		0xd7
       
   354 		},
       
   355 		{
       
   356 		0x0433,
       
   357 		0xc7
       
   358 		},
       
   359 		{
       
   360 		0x0434,
       
   361 		0xc4
       
   362 		},
       
   363 		{
       
   364 		0x0435,
       
   365 		0xc5
       
   366 		},
       
   367 		{
       
   368 		0x0436,
       
   369 		0xd6
       
   370 		},
       
   371 		{
       
   372 		0x0437,
       
   373 		0xda
       
   374 		},
       
   375 		{
       
   376 		0x0438,
       
   377 		0xc9
       
   378 		},
       
   379 		{
       
   380 		0x0439,
       
   381 		0xca
       
   382 		},
       
   383 		{
       
   384 		0x043a,
       
   385 		0xcb
       
   386 		},
       
   387 		{
       
   388 		0x043b,
       
   389 		0xcc
       
   390 		},
       
   391 		{
       
   392 		0x043c,
       
   393 		0xcd
       
   394 		},
       
   395 		{
       
   396 		0x043d,
       
   397 		0xce
       
   398 		},
       
   399 		{
       
   400 		0x043e,
       
   401 		0xcf
       
   402 		},
       
   403 		{
       
   404 		0x043f,
       
   405 		0xd0
       
   406 		},
       
   407 		{
       
   408 		0x0440,
       
   409 		0xd2
       
   410 		},
       
   411 		{
       
   412 		0x0441,
       
   413 		0xd3
       
   414 		},
       
   415 		{
       
   416 		0x0442,
       
   417 		0xd4
       
   418 		},
       
   419 		{
       
   420 		0x0443,
       
   421 		0xd5
       
   422 		},
       
   423 		{
       
   424 		0x0444,
       
   425 		0xc6
       
   426 		},
       
   427 		{
       
   428 		0x0445,
       
   429 		0xc8
       
   430 		},
       
   431 		{
       
   432 		0x0446,
       
   433 		0xc3
       
   434 		},
       
   435 		{
       
   436 		0x0447,
       
   437 		0xde
       
   438 		},
       
   439 		{
       
   440 		0x0448,
       
   441 		0xdb
       
   442 		},
       
   443 		{
       
   444 		0x0449,
       
   445 		0xdd
       
   446 		},
       
   447 		{
       
   448 		0x044a,
       
   449 		0xdf
       
   450 		},
       
   451 		{
       
   452 		0x044b,
       
   453 		0xd9
       
   454 		},
       
   455 		{
       
   456 		0x044c,
       
   457 		0xd8
       
   458 		},
       
   459 		{
       
   460 		0x044d,
       
   461 		0xdc
       
   462 		},
       
   463 		{
       
   464 		0x044e,
       
   465 		0xc0
       
   466 		},
       
   467 		{
       
   468 		0x044f,
       
   469 		0xd1
       
   470 		},
       
   471 		{
       
   472 		0x0451,
       
   473 		0xa3
       
   474 		},
       
   475 		{
       
   476 		0x2219,
       
   477 		0x95
       
   478 		},
       
   479 		{
       
   480 		0x221a,
       
   481 		0x96
       
   482 		},
       
   483 		{
       
   484 		0x2248,
       
   485 		0x97
       
   486 		},
       
   487 		{
       
   488 		0x2264,
       
   489 		0x98
       
   490 		},
       
   491 		{
       
   492 		0x2265,
       
   493 		0x99
       
   494 		},
       
   495 		{
       
   496 		0x2320,
       
   497 		0x93
       
   498 		},
       
   499 		{
       
   500 		0x2321,
       
   501 		0x9b
       
   502 		},
       
   503 		{
       
   504 		0x2500,
       
   505 		0x80
       
   506 		},
       
   507 		{
       
   508 		0x2502,
       
   509 		0x81
       
   510 		},
       
   511 		{
       
   512 		0x250c,
       
   513 		0x82
       
   514 		},
       
   515 		{
       
   516 		0x2510,
       
   517 		0x83
       
   518 		},
       
   519 		{
       
   520 		0x2514,
       
   521 		0x84
       
   522 		},
       
   523 		{
       
   524 		0x2518,
       
   525 		0x85
       
   526 		},
       
   527 		{
       
   528 		0x251c,
       
   529 		0x86
       
   530 		},
       
   531 		{
       
   532 		0x2524,
       
   533 		0x87
       
   534 		},
       
   535 		{
       
   536 		0x252c,
       
   537 		0x88
       
   538 		},
       
   539 		{
       
   540 		0x2534,
       
   541 		0x89
       
   542 		},
       
   543 		{
       
   544 		0x253c,
       
   545 		0x8a
       
   546 		},
       
   547 		{
       
   548 		0x2550,
       
   549 		0xa0
       
   550 		},
       
   551 		{
       
   552 		0x2551,
       
   553 		0xa1
       
   554 		},
       
   555 		{
       
   556 		0x2552,
       
   557 		0xa2
       
   558 		},
       
   559 		{
       
   560 		0x2553,
       
   561 		0xa4
       
   562 		},
       
   563 		{
       
   564 		0x2554,
       
   565 		0xa5
       
   566 		},
       
   567 		{
       
   568 		0x2555,
       
   569 		0xa6
       
   570 		},
       
   571 		{
       
   572 		0x2556,
       
   573 		0xa7
       
   574 		},
       
   575 		{
       
   576 		0x2557,
       
   577 		0xa8
       
   578 		},
       
   579 		{
       
   580 		0x2558,
       
   581 		0xa9
       
   582 		},
       
   583 		{
       
   584 		0x2559,
       
   585 		0xaa
       
   586 		},
       
   587 		{
       
   588 		0x255a,
       
   589 		0xab
       
   590 		},
       
   591 		{
       
   592 		0x255b,
       
   593 		0xac
       
   594 		},
       
   595 		{
       
   596 		0x255c,
       
   597 		0xad
       
   598 		},
       
   599 		{
       
   600 		0x255d,
       
   601 		0xae
       
   602 		},
       
   603 		{
       
   604 		0x255e,
       
   605 		0xaf
       
   606 		},
       
   607 		{
       
   608 		0x255f,
       
   609 		0xb0
       
   610 		},
       
   611 		{
       
   612 		0x2560,
       
   613 		0xb1
       
   614 		},
       
   615 		{
       
   616 		0x2561,
       
   617 		0xb2
       
   618 		},
       
   619 		{
       
   620 		0x2562,
       
   621 		0xb4
       
   622 		},
       
   623 		{
       
   624 		0x2563,
       
   625 		0xb5
       
   626 		},
       
   627 		{
       
   628 		0x2564,
       
   629 		0xb6
       
   630 		},
       
   631 		{
       
   632 		0x2565,
       
   633 		0xb7
       
   634 		},
       
   635 		{
       
   636 		0x2566,
       
   637 		0xb8
       
   638 		},
       
   639 		{
       
   640 		0x2567,
       
   641 		0xb9
       
   642 		},
       
   643 		{
       
   644 		0x2568,
       
   645 		0xba
       
   646 		},
       
   647 		{
       
   648 		0x2569,
       
   649 		0xbb
       
   650 		},
       
   651 		{
       
   652 		0x256a,
       
   653 		0xbc
       
   654 		},
       
   655 		{
       
   656 		0x256b,
       
   657 		0xbd
       
   658 		},
       
   659 		{
       
   660 		0x256c,
       
   661 		0xbe
       
   662 		},
       
   663 		{
       
   664 		0x2580,
       
   665 		0x8b
       
   666 		},
       
   667 		{
       
   668 		0x2584,
       
   669 		0x8c
       
   670 		},
       
   671 		{
       
   672 		0x2588,
       
   673 		0x8d
       
   674 		},
       
   675 		{
       
   676 		0x258c,
       
   677 		0x8e
       
   678 		},
       
   679 		{
       
   680 		0x2590,
       
   681 		0x8f
       
   682 		},
       
   683 		{
       
   684 		0x2591,
       
   685 		0x90
       
   686 		},
       
   687 		{
       
   688 		0x2592,
       
   689 		0x91
       
   690 		},
       
   691 		{
       
   692 		0x2593,
       
   693 		0x92
       
   694 		},
       
   695 		{
       
   696 		0x25a0,
       
   697 		0x94
       
   698 		}
       
   699 	};
       
   700 
       
   701 LOCAL_D const SCnvConversionData::SVariableByteData::SRange foreignVariableByteDataRanges[]=
       
   702 	{
       
   703 		{
       
   704 		0x00,
       
   705 		0xff,
       
   706 		0,
       
   707 		0
       
   708 		}
       
   709 	};
       
   710 
       
   711 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange foreignToUnicodeDataRanges[]=
       
   712 	{
       
   713 		{
       
   714 		0x00,
       
   715 		0x7f,
       
   716 		SCnvConversionData::SOneDirectionData::SRange::EDirect,
       
   717 		0,
       
   718 		0,
       
   719 			{
       
   720 			0
       
   721 			}
       
   722 		},
       
   723 		{
       
   724 		0x80,
       
   725 		0xff,
       
   726 		SCnvConversionData::SOneDirectionData::SRange::EKeyedTable16OfIndexedTables16,
       
   727 		0,
       
   728 		0,
       
   729 			{
       
   730 			UData_SKeyedTable16OfIndexedTables16(keyedTables16OfIndexedTables16_keyedEntries_foreignToUnicode_1)
       
   731 			}
       
   732 		}
       
   733 	};
       
   734 
       
   735 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange unicodeToForeignDataRanges[]=
       
   736 	{
       
   737 		{
       
   738 		0x0000,
       
   739 		0x007f,
       
   740 		SCnvConversionData::SOneDirectionData::SRange::EDirect,
       
   741 		1,
       
   742 		0,
       
   743 			{
       
   744 			0
       
   745 			}
       
   746 		},
       
   747 		{
       
   748 		0x00b0,
       
   749 		0x25a0,
       
   750 		SCnvConversionData::SOneDirectionData::SRange::EKeyedTable1616,
       
   751 		1,
       
   752 		0,
       
   753 			{
       
   754 			UData_SKeyedTable1616(keyedTable1616_unicodeToForeign_1)
       
   755 			}
       
   756 		}
       
   757 	};
       
   758 
       
   759 GLDEF_D const SCnvConversionData conversionData=
       
   760 	{
       
   761 	SCnvConversionData::EFixedBigEndian,
       
   762 		{
       
   763 		ARRAY_LENGTH(foreignVariableByteDataRanges),
       
   764 		foreignVariableByteDataRanges
       
   765 		},
       
   766 		{
       
   767 		ARRAY_LENGTH(foreignToUnicodeDataRanges),
       
   768 		foreignToUnicodeDataRanges
       
   769 		},
       
   770 		{
       
   771 		ARRAY_LENGTH(unicodeToForeignDataRanges),
       
   772 		unicodeToForeignDataRanges
       
   773 		},
       
   774 	NULL,
       
   775 	NULL
       
   776 	};
       
   777