[Webkit-unassigned] [Bug 197775] Impossible to achieve proper Greek capitalization
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 3 23:18:18 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=197775
--- Comment #1 from Yusuke Suzuki <ysuzuki at apple.com> ---
Right. We should call ICU function to convert to upper/lower case if locale is, az, el, lt, tr.
In JavaScriptCore, we are maintaining this list in Source/JavaScriptCore/runtime/StringPrototype.cpp because this is what ECMAScript spec specifies.
1589 // 10. Let availableLocales be a List with the language tags of the languages for which the Unicode character database contains language sensitive case mappings.
1590 // Note 1: As of Unicode 5.1, the availableLocales list contains the elements "az", "el", "lt", and "tr".
1591 // 11. Let locale be BestAvailableLocale(availableLocales, noExtensionsLocale).
1592 String locale = bestAvailableLocale(noExtensionsLocale, [](const String& candidate) {
1593 if (candidate.length() != 2)
1594 return false;
1595 switch (computeTwoCharacters16Code(candidate)) {
1596 case computeTwoCharacters16Code("az"_s):
1597 case computeTwoCharacters16Code("el"_s):
1598 case computeTwoCharacters16Code("lt"_s):
1599 case computeTwoCharacters16Code("tr"_s):
1600 return true;
1601 default:
1602 return false;
1603 }
1604 });
1605
1606 // 12. If locale is undefined, let locale be "und".
1607 if (locale.isNull())
1608 locale = "und"_s;
1609
1610 //
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201104/13ad820e/attachment.htm>
More information about the webkit-unassigned
mailing list