views:

232

answers:

1

How can I encode a string (iso to utf-8 for example) in Ruby on Rails, using Ruby 1.8.7 ?

+5  A: 

Use toutf8 method.

"my string".toutf8
Simone Carletti
I'll try it here, thanx =]
Lucas Renan
Any idea how to encode to another (not utf8) encoding?
Devenv
Use ICONV or Ruby 1.9 methods.
Simone Carletti