[mod_python] Unicode Support

Gustavo Córdova Avila gustavo.cordova at q-voz.com
Mon Nov 29 09:39:00 EST 2004


Ivo Looser wrote:

>Hi Guys
>
>I whould like to change my unicode settings in Mod_Python.
>
>I saw a lot of but nothing helps me:-)
>
>Basicly I should like to start the pyhton interpreter with -U command in my
>Apache.
>
>Is it possible?
>
>TIA Ivo Looser
>
I don't think Apache understands unicode strings yet, you'd
have to encode your unicode objects into something that can
be transmited vía plain http:

request.content_type = 'text/html;charset="utf-8"'
request.write(YOUR_UNICODE_CONTENT.encode("utf-8"))

something like that.

I suppose mod_python could be configured to do that kind of
stuff automagically, but it's much better to have it behave
explicitly, instead of implicitly (IMO).
--
Gustavo Córdova Avila <gustavo.cordova at q-voz.com> 
<mailto:gustavo.cordova at q-voz.com>
*Tel:* +52 (81) 8130-1919 ext. 127
Integraciones del Norte, S.A. de C.V.
Padua #6047, Colonia Satélite Acueducto
Monterrey, Nuevo León, México.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20041129/47f310f2/signature.bin


More information about the Mod_python mailing list