[Catalyst] Charset best practice

Dominic Germain mailinglists at sogetel.com
Fri Nov 2 03:02:26 GMT 2007


Great!  Overrinding the process method do the job!

Merci beaucoup!

Dominic Germain
---------------------------------------------
Administrateur réseau / Network administrator
Sogetel
www.sogetel.net

mailinglists at sogetel.com




On 07-11-01, at 11:07, Dami Laurent (PJ) wrote:

>
>> -----Message d'origine-----
>> De : Dominic Germain [mailto:mailinglists at sogetel.com]
>> Envoyé : mercredi, 31. octobre 2007 22:04
>> À : The elegant MVC web framework
>> Objet : [Catalyst] Charset best practice
>>
>> Hi,
>>
>> We are currently building an application using Catalyst framework and
>> have a lot of encoding problem.  Since we use a lot on french
>> characters (like é-è-ê-à-ç), we need to take care of the encoding of
>> Perl module and TT templates.
>>
>> We have a running setup with Perl module in ISO-8859-1 (latin1) and
>> templates in UTF-8.  That strange match works great under
>> Apache using
>> mod_perl.  All french characters are parse correctly even if they are
>> from templates, Perl code or MySQL db.
>>
>> If we run the app. under Catalyst dev. server, everything goes
>> wrongs.  We have a lot of "gremlins" instead of correct char.  We are
>> unable to figure out what should be done to have correct
>> output in all
>> case.
>>
>> Our setup :
>>
>>  Apache charset : ISO-8859-1
>>  In TT's view :     ENCODING     => 'ISO-8859-1'
>>  All Perl and TT file save in : ISO-8859-1
>>
>> Are we on the good way?
>>
>> Dominic Germain
>> ---------------------------------------------
>> Administrateur réseau / Network administrator
>> Sogetel
>> www.sogetel.net
>>
>> mailinglists at sogetel.com
>>
>
> Salut Dominic,
>
> We also run a Catalyst app in french and iso-8859-1.
>
> Catalyst::View::TT is hardcoded in UTF8. So the trick is to define a  
> subclass in which you override the process() method, and there you  
> set $c->response->content_type('text/html; charset=iso-8859-1');
>
> Bonne chance, L. Dami
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/




More information about the Catalyst mailing list