[Catalyst] Double encoding of UTF8 strings - RESOLVED

jul.gil at gmail.com jul.gil at gmail.com
Mon Oct 10 15:27:51 GMT 2011

2011/10/9 Oliver Gorwits <oliver at cpan.org>:
> On 07/10/2011 10:21, jul.gil at gmail.com wrote:
>> I have installed and ran successfully the AutoCRUD plugin, I set up a
>> mysql database tables to use UT8 charset, the charset in the ajax
>> requests is utf-8, everything seems correct, except the data in the
>> grids are double encoded, that means é instead of é.
> After some investigation and poking around in documentation I found that the
> following is essential to using Unicode in Catalyst apps:
> 1) tell your database connection to use unicode (this will be a flag in the
> connect options, alongside your username, password, etc).
> 2) load the Catalyst::Plugin::Unicode::Encoding plugin.
> These ensure that data is flagged correctly when moving in both directions
> between the database and the user interface.
> Acknowledgment must go the author(s) of the following pages:
> http://wiki.catalystframework.org/wiki/tutorialsandhowtos/using_unicode
> https://metacpan.org/module/DBIx::Class::Manual::Cookbook#Using-Unicode
> The wiki page tells you the flag to use for each of the popular database
> engines (I only tested with SQLite).
> I hope this helps you Julien, and also the list archives!

Works perfectly well. Thanks!
I knew the bug was between the keyboard and the chair...

Julien Gilles.

More information about the Catalyst mailing list