TT and UTF8?
dave at dave.org.uk
Fri Jan 29 19:07:28 GMT 2010
On 01/29/2010 02:30 PM, Dave Hodgkinson wrote:
> Anyone had issues with TT and UTF8?
> sheriff and theorbtwo have got me a long way down the line but...
> I have a string which is_utf8() and contains weird characters. I
> restart apache and Mötorhead displays fine. Next time through it's
> Mot�rhead. Printing unpack(H*) shows the right octets in the string.
> A tcpdump shows two byes being sent on the first hit and only one
> on the second.
> Any quick suggestions before I spend tomorrow swearing at this? Am
> I being misled by unpack? And tools I can use to look to see what
> TT is doing with my apparently perfectly formed UTF8?
There's a Perlanet fork that has a hack for dealing correctly with
Templates that contain UTF-9 whether or not they contain a BOM.
It does it by overriding the Template::Provider::_decode_unicode subroutine.
Might be useful to you.
More information about the london.pm