Encode string in Ruby on Rails

How can I encode a string (e.g. iso for utf-8) in Ruby on Rails using Ruby 1.8.7?

+4
source share
1 answer

Use toutf8 .

"my string".toutf8 
+5
source

All Articles