On Thu, Nov 01, 2007 at 04:07:30PM +0100, Dami Laurent (PJ) wrote:
> 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');


The OP said the templates were UTF-8.

If the templates are UTF-8 then you (should) have

    TT::View's ENCODING => 'UTF-8';

That will decode the UTF-8 templates into Perl's internal encoding.

Setting the content type won't automatically encode the content,
though.  That's why the Encoding::Unicode plugin does this in
finalize:

    $c->response->body( $c->encoding->encode( $c->response->body, $CHECK ) );

That plugin also will decode all incoming parameters.


-- 
Bill Moseley
[EMAIL PROTECTED]


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to