Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by andal (Friar)
on Mar 22, 2013 at 08:45 UTC ( #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.


Comment on Re^2: Percent encoding of URIs with UTF-8 characters
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-27 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls