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 ?.
I am pretty sure that the data in the database are correct, and the
json data are also correctly displayed (the raw data received contains
the wrong characters). The double encoding seems then to appear in the
View of AutoCRUD, that is just a Catalyst::JSON::View simply used
without any customization.
I have hacked around this AutoCRUD JSON view, and end up with a solution :
- overload the encode_json method in the view to call directly
JSON::XS without the utf8 call, ie a simple
- and overload the process method in order to remove the $json =
In short : don't touch my data, they are already in utf8, just send
them to the browser. It works, but I don't know why...
It is probably a bad solution, as I can't imagine that
Catalyst::JSON::View is wrong, but I wonder what is the correct way to
Couldn't it be a problem in DBIx::Class that does not correctly handle
ut8 columns ?