charconvfw/Charconvplugin/src/G_WIN874.cpp
branchRCL_3
changeset 17 336bee5c2d35
parent 0 1fb32624e06b
equal deleted inserted replaced
16:748ec5531811 17:336bee5c2d35
       
     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 SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry keyedTable1616_foreignToUnicode_1[]=
       
    37 	{
       
    38 		{
       
    39 		0x80,
       
    40 		0x20ac
       
    41 		},
       
    42 		{
       
    43 		0x85,
       
    44 		0x2026
       
    45 		},
       
    46 		{
       
    47 		0x91,
       
    48 		0x2018
       
    49 		},
       
    50 		{
       
    51 		0x92,
       
    52 		0x2019
       
    53 		},
       
    54 		{
       
    55 		0x93,
       
    56 		0x201c
       
    57 		},
       
    58 		{
       
    59 		0x94,
       
    60 		0x201d
       
    61 		},
       
    62 		{
       
    63 		0x95,
       
    64 		0x2022
       
    65 		},
       
    66 		{
       
    67 		0x96,
       
    68 		0x2013
       
    69 		},
       
    70 		{
       
    71 		0x97,
       
    72 		0x2014
       
    73 		},
       
    74 		{
       
    75 		0xa0,
       
    76 		0x00a0
       
    77 		}
       
    78 	};
       
    79 
       
    80 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange::UData::SKeyedTable1616::SEntry keyedTable1616_unicodeToForeign_1[]=
       
    81 	{
       
    82 		{
       
    83 		0x00a0,
       
    84 		0xa0
       
    85 		},
       
    86 		{
       
    87 		0x2013,
       
    88 		0x96
       
    89 		},
       
    90 		{
       
    91 		0x2014,
       
    92 		0x97
       
    93 		},
       
    94 		{
       
    95 		0x2018,
       
    96 		0x91
       
    97 		},
       
    98 		{
       
    99 		0x2019,
       
   100 		0x92
       
   101 		},
       
   102 		{
       
   103 		0x201c,
       
   104 		0x93
       
   105 		},
       
   106 		{
       
   107 		0x201d,
       
   108 		0x94
       
   109 		},
       
   110 		{
       
   111 		0x2022,
       
   112 		0x95
       
   113 		},
       
   114 		{
       
   115 		0x2026,
       
   116 		0x85
       
   117 		},
       
   118 		{
       
   119 		0x20ac,
       
   120 		0x80
       
   121 		}
       
   122 	};
       
   123 
       
   124 LOCAL_D const SCnvConversionData::SVariableByteData::SRange foreignVariableByteDataRanges[]=
       
   125 	{
       
   126 		{
       
   127 		0x00,
       
   128 		0xfb,
       
   129 		0,
       
   130 		0
       
   131 		}
       
   132 	};
       
   133 
       
   134 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange foreignToUnicodeDataRanges[]=
       
   135 	{
       
   136 		{
       
   137 		0x00,
       
   138 		0x7f,
       
   139 		SCnvConversionData::SOneDirectionData::SRange::EDirect,
       
   140 		0,
       
   141 		0,
       
   142 			{
       
   143 			0
       
   144 			}
       
   145 		},
       
   146 		{
       
   147 		0xa1,
       
   148 		0xda,
       
   149 		SCnvConversionData::SOneDirectionData::SRange::EOffset,
       
   150 		0,
       
   151 		0,
       
   152 			{
       
   153 			STATIC_CAST(TUint, 3424)
       
   154 			}
       
   155 		},
       
   156 		{
       
   157 		0xdf,
       
   158 		0xfb,
       
   159 		SCnvConversionData::SOneDirectionData::SRange::EOffset,
       
   160 		0,
       
   161 		0,
       
   162 			{
       
   163 			STATIC_CAST(TUint, 3424)
       
   164 			}
       
   165 		},
       
   166 		{
       
   167 		0x80,
       
   168 		0xa0,
       
   169 		SCnvConversionData::SOneDirectionData::SRange::EKeyedTable1616,
       
   170 		0,
       
   171 		0,
       
   172 			{
       
   173 			UData_SKeyedTable1616(keyedTable1616_foreignToUnicode_1)
       
   174 			}
       
   175 		}
       
   176 	};
       
   177 
       
   178 LOCAL_D const SCnvConversionData::SOneDirectionData::SRange unicodeToForeignDataRanges[]=
       
   179 	{
       
   180 		{
       
   181 		0x0000,
       
   182 		0x007f,
       
   183 		SCnvConversionData::SOneDirectionData::SRange::EDirect,
       
   184 		1,
       
   185 		0,
       
   186 			{
       
   187 			0
       
   188 			}
       
   189 		},
       
   190 		{
       
   191 		0x0e01,
       
   192 		0x0e3a,
       
   193 		SCnvConversionData::SOneDirectionData::SRange::EOffset,
       
   194 		1,
       
   195 		0,
       
   196 			{
       
   197 			STATIC_CAST(TUint, -3424)
       
   198 			}
       
   199 		},
       
   200 		{
       
   201 		0x0e3f,
       
   202 		0x0e5b,
       
   203 		SCnvConversionData::SOneDirectionData::SRange::EOffset,
       
   204 		1,
       
   205 		0,
       
   206 			{
       
   207 			STATIC_CAST(TUint, -3424)
       
   208 			}
       
   209 		},
       
   210 		{
       
   211 		0x00a0,
       
   212 		0x20ac,
       
   213 		SCnvConversionData::SOneDirectionData::SRange::EKeyedTable1616,
       
   214 		1,
       
   215 		0,
       
   216 			{
       
   217 			UData_SKeyedTable1616(keyedTable1616_unicodeToForeign_1)
       
   218 			}
       
   219 		}
       
   220 	};
       
   221 
       
   222 GLDEF_D const SCnvConversionData conversionData=
       
   223 	{
       
   224 	SCnvConversionData::EFixedBigEndian,
       
   225 		{
       
   226 		ARRAY_LENGTH(foreignVariableByteDataRanges),
       
   227 		foreignVariableByteDataRanges
       
   228 		},
       
   229 		{
       
   230 		ARRAY_LENGTH(foreignToUnicodeDataRanges),
       
   231 		foreignToUnicodeDataRanges
       
   232 		},
       
   233 		{
       
   234 		ARRAY_LENGTH(unicodeToForeignDataRanges),
       
   235 		unicodeToForeignDataRanges
       
   236 		},
       
   237 	NULL,
       
   238 	NULL
       
   239 	};
       
   240