Hi,

if a URL parameter contains a Unicode character (e.g. 
www.example.com/?param=%D6lso%DF <http://www.example.com/?param=%D6lso%DF>  
which stands for param=Ölsoße), the parameter is not correctly parsed as 
Unicode.

 

I did the following to test it:

1.       Create a new Catalyst App: catalyst.pl UnicodeTest

2.       Set Root.pm Controller to correct encoding by adding ‘use utf8;’ at 
the top of the file

3.       Then add the following lines to the Root.pm Controller in the index 
function (don’t forget to use Data::Dumper):
$c->log->debug(Dumper($c->req->params));
$c->log->debug(Dumper("Ölsoße"));

4.       This outputs for the example url: localhost:3000/?param=%D6lso%DF:



[debug] $VAR1 = {

          'param' => "\x{fffd}lso\x{fffd}e"

        };

[debug] $VAR1 = '\x{d6}lso\x{df}e';

 

 

As you can see, the first output only contains one equal character: \x{fffd} 
which is obviously not the same as it should be: \x{d6}lso\x{df}e

 

I already tried adding the ‘encoding => 'UTF-8'’ config option, but this didn’t 
change anything.

 

Am I missing a specific setting?

 

My Catalyst version: 5.90097

Perl version: v5.18.2

 

Thanks for your help!

Stefan

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to