[Catalyst] Avoiding UTF8 in Catalyst

Bill Moseley moseley at hank.org
Sun Nov 22 01:16:24 GMT 2009


On Sat, Nov 21, 2009 at 2:22 PM, Marc SCHAEFER <schaefer at alphanet.ch> wrote:

> Hi,
>
> my goal: no UTF8, in short:
>

Can you explain why?  That sounds like something to regret later down the
road.
Even if your templates have latin1 characters you can still output utf8.
Less to to worry about with entity encoding, I guess.



>
>   - all the perl code, all the data files, all the template files and
>     the UNIX locale are all in ISO-8859-1
>

Hopefully you don't have much text in your perl code.  Get the database into
utf8 will be a win long term.



>
>   - the HTML result should be in ISO-8859-1
>     (Content-Type: text/html; charset=3Diso-8859-1)
>

You need to encode the body, too. Plugin: Unicode::Encoding was just updated
by Tom, IIRC.



>
>   - the Content-Length: should be correct.
>
> First, I modified lib/MyApp/View/TT.pm as follows:
>
>   __PACKAGE__->config(TEMPLATE_EXTENSION =3D> '.tt',
>                       DEFAULT_ENCODING   =3D> 'ISO-8859-1',
>                       WRAPPER =3D> 'wrapper.tt');
>

There's a DEFAULT_ENCODING option?  Isn't it just ENCODING?



>
> Apparently all diacritic characters are expanded into HTML entities.
>

Where does that happen?




-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091121/a2e19=
5e1/attachment.htm


More information about the Catalyst mailing list