tenderlove/mechanize — Issue #212: In some cases, search().text returns Mojibakes and search().inner_html no
Author: joao-gsneto
Created: 2012-03-08 20:41:03+00:00
State: open

I'm writing a script with a simple search on a page:

This page have encoded with UTF-8 with brasilian portuguese characters (ã, ç é, õ...) and the method:

page.search( '.class-name' ).text returns invalid characters:

Conheça => ConheÃ§a
Açaí => AÃ§aÃ

If i change this method for
page.search( '.class-name' ).inner_html
Mechanize return the strings correctly ( with portuguese characters ).

Do you know this problem?

I'm using: mechanize-1.0.1.beta.20110107104205 and ruby 1.8.7