From: mail@... Date: 2017-10-26T09:28:32+00:00 Subject: [ruby-core:83576] [Ruby trunk Feature#14055] String#casecmp should use Unicode folding Issue #14055 has been updated by rbjl (Jan Lelis). Thanks for the pointer! ---------------------------------------- Feature #14055: String#casecmp should use Unicode folding https://bugs.ruby-lang.org/issues/14055#change-67604 * Author: rbjl (Jan Lelis) * Status: Rejected * 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: