[Catalyst] Passing UTF-8 arg in URL to DBIC search

Hugh Hunter hhunter at gmail.com
Sat Sep 27 14:51:54 BST 2008

Hello all,

I've been struggling with this for some time and know there must be an  
answer out there.

I'm using URL arguments to pass parameters to my controller.  It's a  
site about names, so take the url http://domain.com/name/Jesús (note  
the accented u).  The Name.pm controller has an :Args(1) decorator so  
Jesús is stored in $name and then passed to my DBIC model in a - 
 >search({name => $name}) call.  This doesn't manage to find the row  
that exists in mysql.  When I dump $name I get:

'name' => 'Jes\xc3\xbas'

which I think I understand as being perl's internal escaping of utf-8  

I've done everything recommended on http://dev.catalystframework.org/wiki/gettingstarted/tutorialsandhowtos/using_unicode 
  and the name column in my mysql database uses the utf-8 charset.

Where am I going wrong?

Best regards,


More information about the Catalyst mailing list