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

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

Expand Messages
  • Paul Mothersdill
    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
    Message 1 of 2 , Jul 5 1:56 AM
    • 0 Attachment
      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)?

      pm

      ------------------------------------------------------------------------------
      All of the data generated in your IT infrastructure is seriously valuable.
      Why? It contains a definitive record of application performance, security
      threats, fraudulent activity, and more. Splunk takes this data and makes
      sense of it. IT sense. And common sense.
      http://p.sf.net/sfu/splunk-d2d-c2
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • 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 2 of 2 , Jul 5 10:40 AM
      • 0 Attachment
        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.