You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
String#toLowerCase fails to lower final sigma after a space or non-cased character #3063
String#toLowerCase() lowers Greek Σ (U+03A3) at the end of a word to medial σ (U+03C3) instead of final ς (U+03C2) whenever a non-cased, non-case-ignorable character (such as a space or digit) appears earlier in the string within the lookbehind window.
Single-word "ΟΔΟΣ".toLowerCase() returns "οδος" as expected, but "Η ΟΔΟΣ".toLowerCase() returns "η οδοσ" instead of "η οδος", and "1 AΣ".toLowerCase() returns "1 aσ" instead of "1 aς". In JavaScript, Σ is lowered to ς whenever it is immediately preceded by a cased character (ignoring case-ignorable characters) and not followed by one.
In isFinalSigma, the backward loop sets found = true when it matches a preceding cased character, but is missing a break;, so it continues scanning backwards and returns false upon hitting an earlier space or other non-cased character.
Activity