How could I downcase a non-English string in Ruby on Rails 3 ?
str = "Привет" # Russian
puts str[0].ord # => 1055
str.downcase!
puts str[0].ord # => 1055 (Should be 1087)
I want it to work in Ruby 1.8.7 as well as Ruby 1.9.2.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1 Answer