in reply to Re: Net::Google and non-English languages
in thread Net::Google and non-English languages

The code is the the one I saw in the Synopsis of Net::Google
use Net::Google; use constant LOCAL_GOOGLE_KEY => "********************************"; my $google = Net::Google->new(key=>LOCAL_GOOGLE_KEY); my $search = $google->search(); use utf8; my $str = "פרל"; $search->query($str); map { print $_->URL()."\n"; } @{$search->results()};
I even checked using the is_uft8 function of Encode if the string is in utf8 and it reported true.

Actually gaal and I have even ran tcpdump on the port and it seemed that the string was sent out correctly.

ps. It seems that the Monastery (or my browser ?) turned the real Hebrew string above into some strange representation.

Replies are listed 'Best First'.
Re^3: Net::Google and non-English languages
by graff (Chancellor) on Sep 06, 2005 at 20:50 UTC
    I've never used Net::Google myself (or the Google SOAP API either), so I hope others can help more than I can. (E.g. I don't know whether your "local google key" value is literally a string of asterisks, or whether you're just using that to mask some actual private string assigned to you somehow by google.)

    Anyway, does your "ps" comment at the end refer to the string being assigned to "$str" in that snippet, and does this explain why you have  "פרל" there instead of actual utf8 data? Have you tried doing it like this:

    my $str = "\x{1508}\x{1512}\x{1500}";
    If not, try that. (Just a shot in the dark..)