Bug 812837 - Define the folded case of Turkish variants of "I" to be simply "i". r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D67092

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alex Henrie 2020-03-23 16:57:08 +00:00
parent 2876ae4b84
commit 0c84c81f97
2 changed files with 12 additions and 0 deletions

View File

@ -125,6 +125,12 @@ inline uint32_t GetTitlecaseForAll(
}
inline uint32_t GetFoldedcase(uint32_t aCh) {
// Handle dotted capital I and dotless small i specially because we want to
// use a combination of ordinary case-folding rules and Turkish case-folding
// rules.
if (aCh == 0x0130 || aCh == 0x0131) {
return 'i';
}
return u_foldCase(aCh, U_FOLD_CASE_DEFAULT);
}

View File

@ -3,6 +3,7 @@
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=202251
https://bugzilla.mozilla.org/show_bug.cgi?id=450048
https://bugzilla.mozilla.org/show_bug.cgi?id=812837
https://bugzilla.mozilla.org/show_bug.cgi?id=969980
https://bugzilla.mozilla.org/show_bug.cgi?id=1589786
https://bugzilla.mozilla.org/show_bug.cgi?id=1611568
@ -62,6 +63,10 @@ async function runTests() {
retRange = rf.Find(searchValue, searchRange, startPt, endPt);
ok(!retRange, "\"" + searchValue + "\" found (not caseSensitive)");
searchValue = "istanbul";
retRange = rf.Find(searchValue, searchRange, startPt, endPt);
ok(retRange, "\"" + searchValue + "\" not found (not caseSensitive)");
searchValue = "degrees k";
retRange = rf.Find(searchValue, searchRange, startPt, endPt);
ok(retRange, "\"" + searchValue + "\" not found (not caseSensitive)");
@ -296,6 +301,7 @@ async function runTests() {
<p id="nullcharsinjected"></p>
<p id="greek">ΛΌΓΟΣ</p>
<p id="korean"></p>
<p id="turkish">İstanbul</p>
<p id="kelvin">degrees &#x212A;</p>
<p id="guarani">G̃uahe</p>
<p id="deseret">𐐐𐐯𐑊𐐬 𐐶𐐯𐑉𐑊𐐼!</p>