Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Percent encoding of URIs with UTF-8 characters

by andal (Hermit)
on Mar 22, 2013 at 08:45 UTC ( [id://1024890]=note: print w/replies, xml ) Need Help??


in reply to Re: Percent encoding of URIs with UTF-8 characters
in thread Percent encoding of URIs with UTF-8 characters

Just a small note. In the above example, the strings are coming from the source, so the "encode" function is used to convert them to CP1250. In the OP script, the strings are coming from external file and they are already "octet sequences", so instead of "encode" one should use "from_to".

uri_escape Encode::from_to($_, "UTF-8", "CP1250");
Of course, an alternative would be to specify "encoding" for the file, but current version of the script does not do it.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found