[Catalyst] utf-8 problems

Jonas Alves jonas.alves at gmail.com
Wed Dec 12 10:27:27 GMT 2007


On Dec 12, 2007 10:08 AM, Jon <catalyst at bytabok.com> wrote:

> 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 con=
taining
> =F6. The =F6 itself is displayed correctly but all =F6:s in the template =
gets
> garbled. If I don't do anything =F6-related in the code the templates loo=
ks
> 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 packa=
ges
> 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 sa=
me
> 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
>

Is it possible that the broken machine has an old TT version that doesn't
support the ENCODING =3D> 'UTF-8' parameter?

-- =

Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071212/9140b=
00b/attachment.htm


More information about the Catalyst mailing list