ICU-2267 Change the Japanese collation default strength to tertiary

X-SVN-Rev: 9832
This commit is contained in:
Vladimir Weinstein 2002-09-03 19:43:11 +00:00
parent dce332b77d
commit 827db2e60a
4 changed files with 13 additions and 9 deletions

View file

@ -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

View file

@ -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],

View file

@ -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) {

View file

@ -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);