Not sure if you have tried URI::Escape..
use URI::Escape;
$str = uri_unescape("%c2 %a2");
print "$str";
works!!! | [reply] [d/l] |
I send that to the log with die and it says... \xc2 \xa2
If I send that to DBI::Mysql it saves it as: £
| [reply] |
To remove that accented character u can use Text::Unaccent
| [reply] |
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)
| [reply] |
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/)
| [reply] |