You said translate. Did you mean decode? URI will handle the URI decoding, but you'll have to reverse the character decoding yourself. (URI can't do it since it doesn't know which character encoding was used.)
use URI qw( );
my @segments = URI->new($url)->path_segments();
utf8::decode($_) for @segments;
URI, utf8
Update: Added missing decode. | [reply] [d/l] [select] |
Hi Ed,
When you say URL encoded, you do know that %nnnn URL encoding is Unicode chr(0xnnnn), Just checking.
Looking back over your previous question, this gives you the Unicode words you spoke of, as to human language translation engines in Perl, I'm afraid I can't answer that aspect of your problem :( | [reply] |