Hi

This looks like chinese to me

#!/usr/bin/perl -- use strict; use warnings; use WWW::Mechanize; use Data::Dump qw/ dd /; use Encode qw/ encode /; my $ua = WWW::Mechanize->new; $ua->get(q{http://www.google.cn/}); dd( $ua->text ); my $tr = $ua->find_link( url_regex => qr/translate/i )->text; dd( $tr ); dd( encode('UTF-8', $tr ) ); __END__ "Google google.com.hk\x{8BF7}\x{6536}\x{85CF}\x{6211}\x{4EEC}\x{7684} +\x{7F51}\x{5740} \x{7FFB}\x{8BD1}\xA92011 - ICP\x{8BC1}\x{5408}\x{5B5 +7}B2-20070004\x{53F7}" "\x{7FFB}\x{8BD1}" "\xE7\xBF\xBB\xE8\xAF\x91"

"%E7%BF%BB%E8%AF%91" spells translate

perlunitut: Unicode in Perl


In reply to Re: Perl not recognizing Chinese by beech
in thread Perl not recognizing Chinese by grsampson

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.