Project

General

Profile

Bug #11284

String#upcase and String#downcase don't work for accented characters

Added by pabloh (Pablo Herrero) almost 2 years ago. Updated over 1 year ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[ruby-core:69666]

Description

Many accented and other non-english characters fails to upcase/downcase properly.
Accented characters is the most common are the ones I keep stumbling upon,, but probably other germanic/nordic characters I'm not aware of have the same problems.

For example:

"Hola, ¿Cómo estás?".upcase         # returns "HOLA, ¿CóMO ESTáS?"
"CONFIANÇA".downcase                # returns "confianÇa"
"Un moment s'il vous plaît".upcase  # returns "UN MOMENT S'IL VOUS PLAîT"

Related issues

Duplicates CommonRuby - Feature #10085: Add non-ASCII case conversion to String#upcase/downcase/swapcase/capitalize Open

History

#1 [ruby-core:69668] Updated by 0x0dea (D.E. Akers) almost 2 years ago

http://stackoverflow.com/a/4418681

It would be unreasonable to add natural language processing to Ruby for the sake of a few methods, and it's easy to argue the case for not doing it at all over doing it incorrectly.

#2 Updated by duerst (Martin Dürst) almost 2 years ago

  • Duplicates Feature #10085: Add non-ASCII case conversion to String#upcase/downcase/swapcase/capitalize added

#3 [ruby-core:69676] Updated by duerst (Martin Dürst) almost 2 years ago

  • Status changed from Open to Closed

Closing because this is being worked on (slowly) as #10085, which is already accepted.

#4 [ruby-core:69788] Updated by usa (Usaku NAKAMURA) over 1 year ago

  • Status changed from Closed to Rejected

This status "rejected" does not mean this report is rejected.
This change is only to unify the tickets.

Also available in: Atom PDF