in reply to Conversion of Extended Characters

use CGI;
If you then use the param method, all the escaping will be done for you.

Replies are listed 'Best First'.
Re^2: Conversion of Extended Characters
by ikegami (Patriarch) on Dec 28, 2010 at 23:28 UTC

    CGI removes the URL-encoding, but IIRC, CGI leaves the character encoding in place. If so, you can use Encode's decode_utf8 or utf8's decode on what param returns.

      CGI has the -utf8 pragma:

      This makes CGI.pm treat all parameters as UTF-8 strings. Use this with care, as it will interfere with the processing of binary uploads. It is better to manually select which fields are expected to return utf-8 strings and convert them using code like this:
      use Encode; my $arg = decode utf8=>param('foo');

      The problem with binary (file) uploads is due to CGI's legacy, as it partially treats file uploads as form parameters instead of keeping both separate.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)