Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: question on encoding

by Ieronim (Friar)
on Jan 24, 2007 at 16:02 UTC ( [id://596271]=note: print w/replies, xml ) Need Help??


in reply to question on encoding

You need something like this:
#!/usr/bin/perl use warnings; use strict; use Encode; my $uri = '%C3%A9nfasis'; $uri =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; $uri = decode_utf8($uri); $uri = encode("iso-8859-1", $uri); print $uri;
It prints énfasis.

     s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://596271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-03-28 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found