Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by andal (Hermit)
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024890]
help
Chatterbox?
[Corion]: GotToBTru: Sure - there is a long and sad story of many frantic cleanups that led us to implement this notification ;)
[LanX]: I told you the story about the “new" currency trading system of Dresdner Bank
[LanX]: ?
[Corion]: No, or I don't remember the story ;)

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2017-03-29 11:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (347 votes). Check out past polls.