Re: Unicode issue - historical and probably trivial

"R. Tyler Croy" <[email protected]> Tue, 5 Jul 2011 10:40:53 -0700
Newsgroups gmane.comp.python.cheetah
Message-ID <[email protected]>
--===============4063237500860489193==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="GRPZ8SYKNexpdSJ7"
Content-Disposition: inline


--GRPZ8SYKNexpdSJ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


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.
>=20
> 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).
>=20
> 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

--GRPZ8SYKNexpdSJ7
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk4TTKUACgkQFCbH3D9R4W/vbwCdEPqqaQOlc5LfWCVzsBX99pRQ
iL4AoKgZmcX89wZRyypLzSzG7uHeD/kb
=SBHB
-----END PGP SIGNATURE-----

--GRPZ8SYKNexpdSJ7--


--===============4063237500860489193==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
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
--===============4063237500860489193==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Cheetahtemplate-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

--===============4063237500860489193==--