Skip to content

Commit

Permalink
Fixes: NB#290973 - Cannot share the default video “Dolby Soundscapes”…
Browse files Browse the repository at this point in the history
… when device language is Chinese.

RevBy: Holger Schröder, Jürg Billeter

Details:

Better don’t use [alternate shifted] in the Chinese collation tables
by default, MStringSearch sets it anyway.  If this is really needed in
MCollator as well, I should probably add a setter to the MCollator API
but it is better if this option is off by default in MCollator.
  • Loading branch information
Mike FABIAN committed Dec 8, 2011
1 parent 1042d76 commit 6f9ab43
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 17 deletions.
14 changes: 8 additions & 6 deletions src/icu-extradata/data/coll/collation-converter
Expand Up @@ -2126,12 +2126,14 @@ while (<CLDR>) {
if($currentCollType eq "pinyin") {
$collTypeCollationOutput{"pinyinsearch"} .= "Sequence { \"";
}
if ($currentCollType eq "pinyin") {
# Ignore variable code points on the primary level,
# i.e. ignore spaces when sorting pinyin:
$collTypeCollationOutput{"pinyin"} .= "[alternate shifted]";
$collTypeCollationOutput{"pinyinsearch"} .= "[alternate shifted]";
}
# don’t use [alternate shifted], see NB#290973:
# Bug 290973 - Cannot share the default video “Dolby Soundscapes” when device language is Chinese.
# if ($currentCollType eq "pinyin") {
# # Ignore variable code points on the primary level,
# # i.e. ignore spaces when sorting pinyin:
# $collTypeCollationOutput{"pinyin"} .= "[alternate shifted]";
# $collTypeCollationOutput{"pinyinsearch"} .= "[alternate shifted]";
# }
next;
}
if ($ARG =~ /<\/rules>/) {
Expand Down
4 changes: 2 additions & 2 deletions src/icu-extradata/data/coll/zh.txt

Large diffs are not rendered by default.

40 changes: 31 additions & 9 deletions tests/ft_locales/ft_locales.cpp
Expand Up @@ -2692,14 +2692,14 @@ void Ft_Locales::testMLocaleIndexBucket_data()
<<"" // 5 strokes, 1st stroke vertical, kHanyuPinlu ka3 U+5361 kBigFive A564 kGB0 3108 kRSUnicode 25.3
<<"" // 7 strokes, 1st stroke horizontal, kHanyuPinlu li5 U+674E kBigFive A7F5 kGB0 3278 kRSUnicode 75.3
<<"" // liú 6 strokes, 1st stroke vertical, kMandarin liu2 U+5218 kBigFive - kGB0 3385 kRSUnicode 18.4
<<"刘 Lucy" //liú
<<"刘利" //liú lì
<<"刘利军" //liú lì jūn
<<"刘 Lucy" //liú
<<"刘Lucy" //liú
<<"" //liú; 15 strokes, 1st stroke bending, traditional of 刘 kRSUnicode 18.13
<<"劉 Lucy" //liú ; traditional
<<"劉利" // liú lì; traditional
<<"劉利軍" // liú lì jūn; traditional
<<"劉 Lucy" //liú ; traditional
<<"劉Lucy" //liú ; traditional
<<"" // liǔ; 9 strokes, 1st stroke horizontal, kHanyuPinlu liu3 U+67F3 kBigFive AC68 kGB0 3388 kRSUnicode 75.5"
<<"柳东" // liǔ dōng; 2nd character 5 strokes, initial stroke horizontal, 2nd character U+4E1C
Expand Down Expand Up @@ -2911,6 +2911,8 @@ void Ft_Locales::testMLocaleIndexBucket_data()
<<"" // liú 6 strokes, 1st stroke vertical, kMandarin liu2 U+5218 kBigFive - kGB0 3385 kRSUnicode 18.4
<<"" //liú; 15 strokes, 1st stroke bending, traditional of 刘 kRSUnicode 18.13
<<"" // liǔ; 9 strokes, 1st stroke horizontal, kHanyuPinlu liu3 U+67F3 kBigFive AC68 kGB0 3388 kRSUnicode 75.5"
<<"刘 Lucy" //liú
<<"劉 Lucy" //liú ; traditional
<<"柳东" // liǔ dōng; 2nd character 5 strokes, initial stroke horizontal, 2nd character U+4E1C
<<"柳冬" // liǔ dōng; 2nd character 5 strokes, initial stroke down to left, 2nd character U+51AC
<<"柳咚" // liǔ dōng; 2nd character 8 strokes, initial stroke vertical, 2nd character U+549A
Expand All @@ -2921,9 +2923,7 @@ void Ft_Locales::testMLocaleIndexBucket_data()
<<"劉利軍" // liú lì jūn; traditional
<<"柳利军" // liǔ lì jūn; 3rd character 5 strokes, initial stroke vertical, 3rd character U+519B
<<"柳利軍" // liǔ lì jūn; 3rd character traditional, 9 strokes, initial stroke vertical, 3rd character U+8ECD
<<"刘 Lucy" //liú
<<"刘Lucy" //liú
<<"劉 Lucy" //liú ; traditional
<<"劉Lucy" //liú ; traditional
<<"" // kHanyuPinlu ning2 U+5B81 kBigFive C972 kGB0 3694 kRSUnicode 40.2"
<<"saki"
Expand Down Expand Up @@ -4041,7 +4041,7 @@ void Ft_Locales::testDifferentStrengthComparison_data()
<<"刘利" // liúlì
<<"liu li"
<< (QList<MLocale::Comparison>()
<< MLocale::Equal
<< MLocale::GreaterThan
<< MLocale::GreaterThan
<< MLocale::GreaterThan
<< MLocale::GreaterThan
Expand All @@ -4052,10 +4052,32 @@ void Ft_Locales::testDifferentStrengthComparison_data()
<<"刘 利" // liúlì
<<"liuli"
<< (QList<MLocale::Comparison>()
<< MLocale::Equal
<< MLocale::GreaterThan
<< MLocale::GreaterThan
<< MLocale::GreaterThan
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
);
QTest::newRow("en_US")
<<"ja_JP"
<<"en_US"
<<"a%20b"
<<"a20b"
<< (QList<MLocale::Comparison>()
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
);
QTest::newRow("zh_CN")
<<"ja_JP"
<<"zh_CN"
<<"a%20b"
<<"a20b"
<< (QList<MLocale::Comparison>()
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
<< MLocale::LessThan
);
}

Expand Down

0 comments on commit 6f9ab43

Please sign in to comment.