Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Help for "Cannot decode string with wide characters..." and CGI.pm

by PerlBroker (Acolyte)
on Apr 08, 2012 at 16:57 UTC ( #964006=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Help for "Cannot decode string with wide characters..." and CGI.pm
in thread Help for "Cannot decode string with wide characters..." and CGI.pm

Thank you for this tip, I will use that to get better error messages. But yet it does not give me the string in UTF-8 and it shows the error again: The code is just as yours, with this in the end:

print $q->header; print decode utf8 => $q->param('key');
The "decode utf8" is not needed in my opinion, as the input is already UTF-8, and same error "wide character" is shown on above. But without "decode utf8 =>" I get no errors, but I get this characters: �� -- occurrence is strange, as the script just worked fine with Unicode. Any clues?


Comment on Re^4: Help for "Cannot decode string with wide characters..." and CGI.pm
Download Code
Re^5: Help for "Cannot decode string with wide characters..." and CGI.pm
by Khen1950fx (Canon) on Apr 08, 2012 at 17:05 UTC
    The answer is simple: Do not try to decode an already-composed uri. That's why it works without 'decode utf8'. Does that help?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2015-07-02 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (30 votes), past polls