Re: [Cheetahtemplate-discuss] Unicode issue - historical and probably trivial
- On Tue, 05 Jul 2011, Paul Mothersdill wrote:
> I have a number of templates written many years ago as part of aBy default, now at least, Cheetah should be generating unicode objects, so
> Python/MySQL/mod_python setup on a Ubuntu server. No problems, no
> further development and I'd almost forgotten there were Cheetah
> templates in there.
> The Ubuntu box has been upgraded as per the normal cycles. The latest
> upgrade (10.10 to 11.04 which included Python 2.7 and Cheetah 2.4.3)
> led to the system sending utf-8 to the web browser, rather than 8859-1
> as previously. I've attempted to isolate the problem, and I think it's
> Cheetah (the last link before mod_python sends the stuff to the
> browser) that's now receiving 8859-1 and outputting utf-8 (something
> it presumably didn't do in the version that was packaged in Ubuntu
> Is this correct, and if so is there a simple way to get Cheetah to
> output 8859-1 (can't find anything in the documentation)?
what's being handled by the application or mod_python might be encoding it in
some form or fashion.
(mod_python is EOLd by the way, bewares)
You can (IIRC) tell Cheetah to output a specific encoding with the #encoding
directive at the top of the template.
- R. Tyler Croy