The Rails Active Support gem provides upcase
, downcase
, swapcase
,capitalize
, etc. methods with internationalization support:
gem install activesupport
irb -ractive_support/core_ext/string
"STRING ÁÂÃÀÇÉÊÍÓÔÕÚ".mb_chars.downcase.to_s
=> "string áâãàçéêíóôõú"
"string áâãàçéêíóôõú".mb_chars.upcase.to_s
=> "STRING ÁÂÃÀÇÉÊÍÓÔÕÚ"