From: mame@... Date: 2020-12-17T02:39:34+00:00 Subject: [ruby-core:101485] [Ruby master Bug#17400] Incorrect character downcase for Greek Sigma Issue #17400 has been updated by mame (Yusuke Endoh). Just FYI: I found the special handling code of Greek Sigma in v8. Looks like that it checks if the next character (if any) is a letter or not. https://github.com/v8/v8/blob/4b9b23521e6fd42373ebbcb20ebe03bf445494f9/src/unicode.cc#L177-L185 It uses non-final lower sigma even if the next character is Japanese. ``` $ node > "�����".toLowerCase() '�����' ``` ---------------------------------------- Bug #17400: Incorrect character downcase for Greek Sigma https://bugs.ruby-lang.org/issues/17400#change-89263 * Author: xfalcox (Rafael Silva) * Status: Open * Priority: Normal * Assignee: duerst (Martin D��rst) * ruby -v: ruby 3.0.0dev (2020-12-16T18:46:44Z master 93ba3ac036) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- An issue caused by this bug was first reported at Discourse support community at https://meta.discourse.org/t/unicode-username-results-in-error-loading-profile-page/173182?u=falco. The issue is that in Greek, there are two ways to downcase the letter �������� - �������� when it is used at the end of a word - �������� anywhere else NodeJS follows this rule: ``` ��� node Welcome to Node.js v12.11.1. Type ".help" for more information. > "������������".toLowerCase() '������������' ``` Python too: ``` ��� python Python 3.8.2 (default, Nov 23 2020, 16:33:30) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "������������".lower() '������������' ``` Ruby (both 2.7 and 3) doesn't: ``` ��� ruby --version ruby 3.0.0dev (2020-12-16T18:46:44Z master 93ba3ac036) [x86_64-linux] ��� irb irb(main):001:0> "������������".downcase => "������������" ``` ``` ��� ruby --version ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] ��� irb irb(main):001:0> "������������".downcase => "������������" ``` -- https://bugs.ruby-lang.org/ Unsubscribe: