Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 studying the Monastery: (9)
As of 2014-08-29 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls