On 5/14/07, Jen mlists <[EMAIL PROTECTED]> wrote:
snip
I need to translate this string,
Perl%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%28%EF%BF%BD%EF%BF%BD%EF%BF%BD%C4%B0%EF%BF%BD%29.pdf
This was a string appeared in our web logs.
snip
The following worked for me. And by worked I mean printed out what to
my ignorant eye is one of the various logographic languages (maybe
Kanji?).
Perl锟斤拷锟斤拷锟斤拷锟斤拷(锟斤拷锟侥帮拷).pdf
#!/usr/bin/perl
use strict;
use warnings;
use strict;
use Encode;
use URI::Escape;
my $str =
'Perl%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%28%EF%BF%BD%EF%BF%BD%EF%BF%BD%C4%B0%EF%BF%BD%29.pdf';
my $tr = encode("utf8",decode("gb2312",uri_unescape($str)));
print "$tr\n";