mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-2267 Change the Japanese collation default strength to tertiary
X-SVN-Rev: 9832
This commit is contained in:
parent
dce332b77d
commit
827db2e60a
4 changed files with 13 additions and 9 deletions
|
@ -15,7 +15,8 @@ ja {
|
|||
CollationElements {
|
||||
Version { "4.0" }
|
||||
Sequence {
|
||||
"[strength 4][hiraganaQ on]"
|
||||
"[strength 3]" // if you want complete JIS 4061X support use strength I or 4
|
||||
"[hiraganaQ on]"
|
||||
|
||||
"&\u30FD = \u30FD = \u309D" // KATAKANA ITERATION MARK
|
||||
|
||||
|
|
|
@ -238,6 +238,7 @@ static void TestChooonKigoo(void)
|
|||
}
|
||||
|
||||
log_verbose("Testing Japanese Choo-on Kigoo Characters Collation\n");
|
||||
ucol_setAttribute(myCollation, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
|
||||
ucol_setAttribute(myCollation, UCOL_CASE_LEVEL, UCOL_ON, &status);
|
||||
for (i = 0; i < 7 ; i++) {
|
||||
doTest(myCollation, testChooonKigooCases[i], testChooonKigooCases[i + 1],
|
||||
|
|
|
@ -3285,14 +3285,17 @@ static void TestNewJapanese(void) {
|
|||
"\\u30b7\\u30e3\\u30fc\\u30ec",
|
||||
};
|
||||
*/
|
||||
static const UColAttribute att[] = { UCOL_ALTERNATE_HANDLING};
|
||||
static const UColAttributeValue valShifted[] = { UCOL_SHIFTED };
|
||||
static const UColAttribute att[] = { UCOL_STRENGTH };
|
||||
static const UColAttributeValue val[] = { UCOL_QUATERNARY };
|
||||
|
||||
genericLocaleStarter("ja", test1, sizeof(test1)/sizeof(test1[0]));
|
||||
genericLocaleStarter("ja", test2, sizeof(test2)/sizeof(test2[0]));
|
||||
static const UColAttribute attShifted[] = { UCOL_STRENGTH, UCOL_ALTERNATE_HANDLING};
|
||||
static const UColAttributeValue valShifted[] = { UCOL_QUATERNARY, UCOL_SHIFTED };
|
||||
|
||||
genericLocaleStarterWithOptions("ja", test1, sizeof(test1)/sizeof(test1[0]), att, val, 1);
|
||||
genericLocaleStarterWithOptions("ja", test2, sizeof(test2)/sizeof(test2[0]), att, val, 1);
|
||||
/*genericLocaleStarter("ja", test3, sizeof(test3)/sizeof(test3[0]));*/
|
||||
genericLocaleStarterWithOptions("ja", test1, sizeof(test1)/sizeof(test1[0]), att, valShifted, 1);
|
||||
genericLocaleStarterWithOptions("ja", test2, sizeof(test2)/sizeof(test2[0]), att, valShifted, 1);
|
||||
genericLocaleStarterWithOptions("ja", test1, sizeof(test1)/sizeof(test1[0]), attShifted, valShifted, 2);
|
||||
genericLocaleStarterWithOptions("ja", test2, sizeof(test2)/sizeof(test2[0]), attShifted, valShifted, 2);
|
||||
}
|
||||
|
||||
static void TestStrCollIdenticalPrefix(void) {
|
||||
|
|
|
@ -23,8 +23,6 @@ CollationKanaTest::CollationKanaTest()
|
|||
myCollation = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
myCollation->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_ON, status);
|
||||
}
|
||||
|
||||
CollationKanaTest::~CollationKanaTest()
|
||||
|
@ -181,6 +179,7 @@ void CollationKanaTest::TestChooonKigoo(void)
|
|||
{
|
||||
int32_t i;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
myCollation->setStrength(Collator::QUATERNARY);
|
||||
myCollation->setAttribute(UCOL_CASE_LEVEL, UCOL_ON, status);
|
||||
for (i = 0; i < 7 ; i++) {
|
||||
doTest(testChooonKigooCases[i], testChooonKigooCases[i + 1], Collator::LESS);
|
||||
|
|
Loading…
Add table
Reference in a new issue