Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Cheetahtemplate-discuss] Unicode issue - historical and probably trivial

Expand Messages
  • R. Tyler Croy
    ... By default, now at least, Cheetah should be generating unicode objects, so what s being handled by the application or mod_python might be encoding it in
    Message 1 of 2 , Jul 5, 2011
      On Tue, 05 Jul 2011, Paul Mothersdill wrote:

      > I have a number of templates written many years ago as part of a
      > 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
      > 10.10).
      >
      > 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)?

      By default, now at least, Cheetah should be generating unicode objects, so
      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.


      Cheers
      - R. Tyler Croy
      --------------------------------------
      Code: http://github.com/rtyler
      Chatter: http://identi.ca/agentdero
      http://twitter.com/agentdero
    Your message has been successfully submitted and would be delivered to recipients shortly.