[Catalyst] utf-8 problems

Jon catalyst at bytabok.com
Wed Dec 12 10:08:38 GMT 2007


Hi,

I'm having some problems with utf-8 and was hoping someone could point me in
the right direction. I've two machines and I just copied (scp:ed) from the
one I've been playing around with to my other and then all my umlaut
characters, when being inserted to the template by perl, like
$c->stash->{umlaut} =3D '=F6' or when fetching data from the database conta=
ining
=F6. The =F6 itself is displayed correctly but all =F6:s in the template ge=
ts
garbled. If I don't do anything =F6-related in the code the templates looks
just fine, including their own =F6:s.

The thing that really confuse me is that it works fine on the machine I
copied it all from. It's two different debian versions, stable on the
non-working and unstable on the working. I've got the same catalyst packages
though and both have the same locales installed. I've also tried the same
data source on the broken I'm using on the working and it's giving the same
result.

I've been really careful trying to have the utf-8 work so I:
In V::TT: ENCODING =3D> 'UTF-8'

in M::DB
        mysql_enable_utf8 =3D> 1,
        on_connect_do       =3D> [
        "SET NAMES 'utf8'",
        "SET CHARACTER SET 'utf8'",
        ],
in MyApp.pm:
use Catalyst qw/
..
    Unicode
/;
and I've tried with and without
use encoding 'utf8';


All my modules are utf-8 encoded and use utf8 if they have strings with
umlauts in them, all my templates are utf-8, the mysql-data is too and the
response headers from apache says "Content-Typetext/html; charset=3Dutf-8".

Anyone got a clue what could be the problem?

Thanks
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071212/ecbf7=
c5d/attachment-0001.htm


More information about the Catalyst mailing list