Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: UTF8 URI Escaping

by ajinkyagadewar (Novice)
on Apr 12, 2012 at 08:48 UTC ( #964724=note: print w/ replies, xml ) Need Help??


in reply to UTF8 URI Escaping

When you talk about form, do you want to do the form submission using Mechanize or any module and unable to do that due to currency encoding?


Comment on Re: UTF8 URI Escaping
Re^2: UTF8 URI Escaping
by snoopy20 (Novice) on Apr 12, 2012 at 09:21 UTC
    I simply want to parse $ENV{QUERY_STRING} and convert any % encodings into the correct , or whatever (in unicode). I would rather not rely on external libraries where possible but right not I'll take anything that works. The closest I've got is the \x encodings which is not enough. Whoops I meant STDIN, but it's encoded the same anyways ( /^application\/x-www-form-urlencoded/)
Re^2: UTF8 URI Escaping
by ajinkyagadewar (Novice) on Apr 12, 2012 at 10:17 UTC
    Not sure if you have tried URI::Escape..
    use URI::Escape; $str = uri_unescape("%c2 %a2"); print "$str";
    works!!!
      I send that to the log with die and it says... \xc2 \xa2 If I send that to DBI::Mysql it saves it as: £

        To remove that accented character u can use Text::Unaccent
        MySQL itself may be causing your problem - what kind of field are you storing it in? BLOB will screw up big style (binary data does not allow encode/decode), TEXT should be a safe bet (provided your MySQL table is set to UTF-8)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-07-26 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls