ANN: Use the decoded HTTP content for proper Unicode.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Thu, 8 Oct 2009 03:13:10 +0000 (03:13 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Thu, 8 Oct 2009 03:13:10 +0000 (03:13 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1123 959494ce-11ee-0310-bf91-de5d638817bd

ANN.pm

diff --git a/ANN.pm b/ANN.pm
index 48bd9c4..8b311f4 100644 (file)
--- a/ANN.pm
+++ b/ANN.pm
@@ -35,12 +35,12 @@ sub _get
     $res = $ua->request(HTTP::Request->new("GET", "$uri"));
     
     if(open CACHE, ">:utf8", $cname) {
-       print CACHE $res->content;
+       print CACHE $res->decoded_content;
        close CACHE;
     }
     
     return undef unless $res->is_success;
-    return $res->content;
+    return $res->decoded_content;
 }
 
 sub getlist