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

Replies are listed 'Best First'.
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?