in reply to Re: Conversion of Extended Characters
in thread Conversion of Extended Characters

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.

Replies are listed 'Best First'.
Re^3: Conversion of Extended Characters
by afoken (Chancellor) on Dec 29, 2010 at 13:03 UTC

    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". ;-)