From 44e34ceffa936686dffaf174278caeed4a627562 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Wed, 1 Jun 2011 21:45:49 +0200 Subject: [PATCH] Qdb: Properly encode text into UTF8 --- quotesite/QdbGrabber.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quotesite/QdbGrabber.pm b/quotesite/QdbGrabber.pm index f9c7387..411be01 100644 --- a/quotesite/QdbGrabber.pm +++ b/quotesite/QdbGrabber.pm @@ -11,6 +11,7 @@ use quotesite::GrabberBase; use LWP::Simple qw(!get); use HTML::TokeParser; use Data::Dumper; +use Encode; use strict; @@ -56,7 +57,7 @@ sub _parse { OUTER: while ($t = $p->get_tag('span')) { if (exists($t->[1]->{'class'}) && ($t->[1]->{'class'} eq 'qt')) { - $metadata->{'CONTENT'} = $p->get_text('/span'); + $metadata->{'CONTENT'} = encode('utf8', decode('iso8859-1', $p->get_text('/span'))); last OUTER; } } -- 1.8.3.1