I have a static website (with some DB content templated in at build  
time) which is all produced as a great pile of TT pushed through ttree

Everything within the site is UTF8 - or is supposed to be :-)

However occasionally I manage to break things so that the unicode  
handling goes wonky (I suspect the last time this happened was a TT  
update).

As far as I can see the way to make ttree generate utf8 correctly on  
the output is to modify ttree to pass {binmode => ':utf8'} to the  
template process method.

For input data from static files, this appears to be read in the  
system default way, and if not unicode by default then a Unicode BOM  
is checked for.  So to ensure input templates are handled as unicode I  
guess I can either:-
    - modify ttree to use the open pragma to default to utf8
    - modify all the templates to have an appropriate BOM

Would people be interested in the idea of adding an additional ttree/ 
tpage option 'utf8' which would use the open pragma to default all  
file ops to utf8?

Alternatively, is my analysis above completely off the wall?

        Nigel.
--
[ Nigel Metheringham             [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to