From: mail@... Date: 2017-10-25T17:42:30+00:00 Subject: [ruby-core:83566] [Ruby trunk Feature#14055] String#casecmp should use Unicode folding Issue #14055 has been reported by rbjl (Jan Lelis). ---------------------------------------- Feature #14055: String#casecmp should use Unicode folding https://bugs.ruby-lang.org/issues/14055 * Author: rbjl (Jan Lelis) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- The following string and symbol methods are currently only ASCII aware: - String#casecmp - String#casecmp! - Symbol#casecmp - Symbol#casecmp! For example: "a".casecmp("A") #=> 0 "��".casecmp("��") #=> 1 Now that Ruby has implemented case-folding (which is meant for comparing strings, see http://unicode.org/faq/casemap_charprop.html#2), it should be used when doing a casecmp on Unicode strings: "��".downcase(:fold) == "��" #=> true -- https://bugs.ruby-lang.org/ Unsubscribe: