locales/loce32/src/ls_coltur.cpp
branchRCL_3
changeset 125 c87e8f932595
parent 115 b359a5400166
child 126 f24e086457b7
equal deleted inserted replaced
115:b359a5400166 125:c87e8f932595
    21 #include <unicode.h>
    21 #include <unicode.h>
    22 
    22 
    23 const TUint KUidColturCollationMethod = 0x100059DD;
    23 const TUint KUidColturCollationMethod = 0x100059DD;
    24 
    24 
    25 static const TUint32 TheColturKey[] = 
    25 static const TUint32 TheColturKey[] = 
    26 	{
    26 	{	 // 10 keys
    27 	0x7540109,0x7540121,0x78e0121,0x8060109,0x8060121,0x85e0109,0x85e0121,0x88e0109,
    27 	0x7540109,0x7540121,0x78d0121,0x8060109,0x8060121,0x85e0109,0x85e0121,0x88e0109,
    28 	0x88e0121,0x78d0109,0x78d0121,0x78e0109,
    28 	0x88e0121,0x78d0109,
    29 	};
    29 	};
    30 
    30 
    31 static const TUint32 TheColturIndex[] = 
    31 static const TUint32 TheColturIndex[] = 
    32 	{
    32 	{	 // 1 indices
    33 	0x49000a,0x690009,0x69000b,0x1310009,
    33 	0x1310009,
    34 	};
    34 	};	 // 1 entries
    35 
    35 
    36 static const TUint16 TheColturStringElement[] = 
    36 static const TUint16 TheColturStringElement[] = 
    37 	{
    37 	{
    38 	0x2,0x67,0x306,0x2,0x47,0x306,0x2,0x49,
    38 	0x2,0x67,0x306,0x2,0x47,0x306,0x2,0x49,
    39 	0x307,0x2,0x6f,0x308,0x2,0x4f,0x308,0x2,
    39 	0x307,0x2,0x6f,0x308,0x2,0x4f,0x308,0x2,
    46 	0x30001,0x60002,0xc0004,0x120006,0x180008,0x0,0x90003,0xf0005,
    46 	0x30001,0x60002,0xc0004,0x120006,0x180008,0x0,0x90003,0xf0005,
    47 	0x150007,
    47 	0x150007,
    48 	};
    48 	};
    49 
    49 
    50 static const TCollationKeyTable TheColturTable = 
    50 static const TCollationKeyTable TheColturTable = 
    51 	{ TheColturKey, TheColturIndex, 4, TheColturStringElement, TheColturStringIndex, 9 };
    51 	{ TheColturKey, TheColturIndex, 1, TheColturStringElement, TheColturStringIndex, 9 };
    52 
    52 
    53 static const TCollationMethod TheCollationMethod[] = 
    53 static const TCollationMethod TheCollationMethod[] = 
    54 	{
    54 	{
    55 		{
    55 		{
    56 		KUidColturCollationMethod, // the method for the locale
    56 		KUidColturCollationMethod, // the method for the locale
    70 	{
    70 	{
    71 	TheCollationMethod,
    71 	TheCollationMethod,
    72 	2
    72 	2
    73 	};
    73 	};
    74 
    74 
    75 static const TUnicodeData TheUnicodeTurkishData[] =	// property table
       
    76 	{
       
    77 	{ 0, 0, 0, 0, 232, 1 },	// Character properties. See the definition of TUnicodeData in /include/unicode.h. Turkish LowerCase fix.
       
    78 	{ 1, 0, 0, 0, -199, 2 }	// Turkish UpperCase fix.
       
    79 	};
       
    80 static const TUnicodeDataRange TheUnicodeTurkishDataRange[] =	// character range table
       
    81 	{
       
    82 // This table defines characters 0x49 and 0x69
       
    83 	{ 0x0, -1 },	// characters 0x0-0x48 has index=-1 into above property table (-1 means not defined)
       
    84 	{ 0x49, 0 },	// characters 0x49-0x49 has index=0 into above property table, that is, 0x49 has property {0,0,0,0,232,1}
       
    85 	{ 0x4A, -1 },	// characters 0x4A-0x68 has index=-1
       
    86 	{ 0x69, 1 },	// character 0x69 has index=1 into above property table, 0x69 has property { 1, 0, 0, 0, -199, 2 }
       
    87 	{ 0x6A, -1 }	// characters 0x6A-0x10FFFF has index=-1
       
    88 	};
       
    89 const TUnicodeDataSet TheUnicodeTurkishDataSet =	
       
    90 	{
       
    91 	TheUnicodeTurkishData, 						// address of above property table
       
    92 	TheUnicodeTurkishDataRange, 					// character range table
       
    93 	sizeof(TheUnicodeTurkishDataRange)/sizeof(TUnicodeDataRange) 	// character range table size (should be 3 in this case)
       
    94 	};
       
    95 
       
    96 // The one and only locale character set object.
    75 // The one and only locale character set object.
    97 const LCharSet TheCharSet =
    76 const LCharSet TheCharSet =
    98 	{
    77 	{
    99 	&TheUnicodeTurkishDataSet,
    78 	NULL,
   100 	&TheCollationDataSet
    79 	&TheCollationDataSet
   101 	};
    80 	};