Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: question on encoding

by Ieronim (Friar)
on Jan 24, 2007 at 16:02 UTC ( #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
Node Status?
node history
Node Type: note [id://596271]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2016-12-06 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.