From: timriker Date: Wed, 20 Mar 2013 18:58:02 +0000 (+0000) Subject: utf8 still broken X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9430d8951f8b19800e4861a77087029853921559;p=infobot.git utf8 still broken git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1931 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/translate.pl b/src/Modules/translate.pl index 4853147..c314a71 100644 --- a/src/Modules/translate.pl +++ b/src/Modules/translate.pl @@ -3,7 +3,6 @@ package translate; use strict; -use Data::Dumper; my $no_translate; my $url = 'http://translate.google.com/translate_a/t'; @@ -29,7 +28,7 @@ sub translateParam { $ua->agent( "Mozilla/5.0 " . $ua->agent ); $ua->timeout(5); - my $req = HTTP::Request->new('GET', 'http://translate.google.com/translate_a/t?client=t&&sl='.$from.'&tl='.$to.'&text='.$phrase); + my $req = HTTP::Request->new('GET', 'http://translate.google.com/translate_a/t?client=t&ie=UTF-8&oe=UTF-8&sl='.$from.'&tl='.$to.'&text='.$phrase); $req->header('Accept-Language' => 'en-us'); $req->header('Accept-Charset' => 'UTF-8,*');