Hi,
Im some cases when I use open to get a web page in ruby the content of the page has an encoding error. Exemple :
open("http://www.google.com.br").read
Chars like ç and ã are replaced by "?"
How can I get the right chars ?
thanks.
Hi,
Im some cases when I use open to get a web page in ruby the content of the page has an encoding error. Exemple :
open("http://www.google.com.br").read
Chars like ç and ã are replaced by "?"
How can I get the right chars ?
thanks.
this seems to work:
require 'iconv'
i = Iconv.new('UTF-8','LATIN1')
i.iconv(open('http://google.com.br').read)