Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
UTF-8 out of Hpricot
Diogo Terror
10/23/2008 1:35:00 PM
Hey,
I'm trying to get some text out of an Hpricot Element but it's not
giving me the correct encoding. The text displays alright when I
inspect the element.
I've already set $KCODE to 'U'
Thks.
1 Answer
Hannes Rammer
10/27/2008 3:51:00 PM
0
Diogo do Nascimento wrote:
> Hey,
> I'm trying to get some text out of an Hpricot Element but it's not
> giving me the correct encoding. The text displays alright when I
> inspect the element.
> I've already set $KCODE to 'U'
> Thks.
that works for me
f = open(
http://...
)
f.rewind
doc = Hpricot(Iconv.conv('utf-8', f.charset,
f.readlines.join("\n")))
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
UTF-8 out of Hpricot
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password