107
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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 |
#include <kernel/ls_std.h>
|
|
20 |
#include <collate.h>
|
|
21 |
#include <unicode.h>
|
|
22 |
|
|
23 |
const TUint KUidColturCollationMethod = 0x100059DD;
|
|
24 |
|
|
25 |
static const TUint32 TheColturKey[] =
|
|
26 |
{
|
|
27 |
0x7540109,0x7540121,0x78e0121,0x8060109,0x8060121,0x85e0109,0x85e0121,0x88e0109,
|
|
28 |
0x88e0121,0x78d0109,0x78d0121,0x78e0109,
|
|
29 |
};
|
|
30 |
|
|
31 |
static const TUint32 TheColturIndex[] =
|
|
32 |
{
|
|
33 |
0x49000a,0x690009,0x69000b,0x1310009,
|
|
34 |
};
|
|
35 |
|
|
36 |
static const TUint16 TheColturStringElement[] =
|
|
37 |
{
|
|
38 |
0x2,0x67,0x306,0x2,0x47,0x306,0x2,0x49,
|
|
39 |
0x307,0x2,0x6f,0x308,0x2,0x4f,0x308,0x2,
|
|
40 |
0x73,0x327,0x2,0x53,0x327,0x2,0x75,0x308,
|
|
41 |
0x2,0x55,0x308,
|
|
42 |
};
|
|
43 |
|
|
44 |
static const TUint32 TheColturStringIndex[] =
|
|
45 |
{
|
|
46 |
0x30001,0x60002,0xc0004,0x120006,0x180008,0x0,0x90003,0xf0005,
|
|
47 |
0x150007,
|
|
48 |
};
|
|
49 |
|
|
50 |
static const TCollationKeyTable TheColturTable =
|
|
51 |
{ TheColturKey, TheColturIndex, 4, TheColturStringElement, TheColturStringIndex, 9 };
|
|
52 |
|
|
53 |
static const TCollationMethod TheCollationMethod[] =
|
|
54 |
{
|
|
55 |
{
|
|
56 |
KUidColturCollationMethod, // the method for the locale
|
|
57 |
NULL, // use the standard table as the main table
|
|
58 |
&TheColturTable, // the locale values override the standard values
|
|
59 |
0 // the flags are standard
|
|
60 |
},
|
|
61 |
{
|
|
62 |
KUidBasicCollationMethod, // the standard unlocalised method
|
|
63 |
NULL, // null means use the standard table
|
|
64 |
NULL, // there's no override table
|
|
65 |
0 // the flags are standard
|
|
66 |
}
|
|
67 |
};
|
|
68 |
|
|
69 |
static const TCollationDataSet TheCollationDataSet =
|
|
70 |
{
|
|
71 |
TheCollationMethod,
|
|
72 |
2
|
|
73 |
};
|
|
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.
|
|
78 |
};
|
|
79 |
static const TUnicodeDataRange TheUnicodeTurkishDataRange[] = // character range table
|
|
80 |
{
|
|
81 |
// This table defines only one character 0x49.
|
|
82 |
{ 0x0, -1 }, // characters 0x0-0x48 has index=-1 into above property table (-1 means not defined)
|
|
83 |
{ 0x49, 0 }, // characters 0x49-0x49 has index=0 into above property table, that is, 0x49 has property {0,0,0,0,232,1}
|
|
84 |
{ 0x4A, -1 } // characters 0x4A-0x10FFFF has index=-1 into above property table (-1 means not defined)
|
|
85 |
};
|
|
86 |
const TUnicodeDataSet TheUnicodeTurkishDataSet =
|
|
87 |
{
|
|
88 |
TheUnicodeTurkishData, // address of above property table
|
|
89 |
TheUnicodeTurkishDataRange, // character range table
|
|
90 |
sizeof(TheUnicodeTurkishDataRange)/sizeof(TUnicodeDataRange) // character range table size (should be 3 in this case)
|
|
91 |
};
|
|
92 |
|
|
93 |
// The one and only locale character set object.
|
|
94 |
const LCharSet TheCharSet =
|
|
95 |
{
|
|
96 |
&TheUnicodeTurkishDataSet,
|
|
97 |
&TheCollationDataSet
|
|
98 |
};
|