In Rails 3 how do I sort an array of strings with special characters.
I have:
[Água, Electricidade, Telefone, Internet, Televisão, Gás, Renda]
However when i invoke sort over the array Água gets sent to the end of the array.
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.
The approach I used when I ran into the same issue (depends on iconv gem):
An alternative would be to use the sort_alphabetical gem.