Using Template Toolkit and UTF-8

Andy Wardley abw at
Thu Jan 19 07:57:46 GMT 2006

Steve Sims wrote:
> The problem I have is that the processed templates that I cache to  
> files aren't being treated as UTF-8 by Template Toolkit.  They don't  
> get created with a UTF-8 BOM.  As a result I get pages where the  
> stuff created on the fly by Template Toolkit is all nicely UTF-8, but  
> the cached bits are garbage. :-(

I'm not sure what you mean when you talk about cached templates.
If you mean templates compiled to disk by TT (e.g. by setting the 
COMPILE_DIR / COMPILE_EXT options) then they should work fine with
UTF8 (and do, to the best of my knowledge).

Or is this some additional caching step that you're implementing 

The TT mailing list might be a better place to ask.  The UTF8 issue has
come up a few times.


More information about the mailing list