See http://jsfiddle.net/34tww2g8/ <h4>Without <code>lang</code> attribute:</h4> <p style="text-transform: uppercase">ένα</p> <h4>With <code>lang</code> attribute:</h4> <p lang='el' style="text-transform: uppercase">ένα</p> The two lines should be different. They are different in Chrome and Firefox, but not WebKit. This is likely due to: Ref<StringImpl> StringImpl::convertToUppercaseWithLocale(const AtomicString& localeIdentifier) { // Use the more-optimized code path most of the time. // Assuming here that the only locale-specific lowercasing is the Turkish casing rules, // and that the only affected character is lowercase "i". if (!needsTurkishCasingRules(localeIdentifier) || find('i') == notFound) return convertToUppercaseWithoutLocale();
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 //
<rdar://problem/81972781>
*** This bug has been marked as a duplicate of bug 211967 ***