Ruby 1.9: how can I properly upcase & downcase multibyte strings?

for anybody coming from Google by ruby upcase utf8:

> "your problem chars here çöğıü Iñtërnâtiônàlizætiøn".mb_chars.upcase.to_s
=> "YOUR PROBLEM CHARS HERE ÇÖĞIÜ IÑTËRNÂTIÔNÀLIZÆTIØN"

solution is to use mb_chars.

Documentation:

Leave a Comment