TT and UTF8?
bobtfish at bobtfish.net
Sun Jan 31 22:57:00 GMT 2010
On 29 Jan 2010, at 23:10, Dave Hodgkinson wrote:
> I've turned off caching in TT, inserted "Motörhead múm" into the
> template as static text and a BOM (od -x 0000000 bbef 3cbf...) as
> the first octets. Works first time, fails second.
Are you using Cache::Memcached from Template::Plugin::Cache? As I was
bitten by this the other day.. :)
(I'd consider doing this a code smell - but I have some legacy crud
at $ork with too much logic in TT, so it's useful..)
Aaaaanyway - Cache::Memcached borks everything by not correctly
storing the utf8 flag...
You can fix this by hacking template::plugin::cache to store a 1 item
list (and retireve that item), which will cause Cache::Memcached to
serialize everything through storable, and ergo avoid the issue..
Which is gross, but works.
I'm also told that if you use CHI, or one of the other clients -
they're more likely to get it right, but I haven't tried this myself..
More information about the london.pm