Reputation: 3917
How can I encode a string (iso to utf-8 for example) in Ruby on Rails, using Ruby 1.8.7 ?
Upvotes: 4
Views: 2522
Reputation: 176382
Use toutf8 method.
"my string".toutf8
Upvotes: 5