Hi,
Try this solution.
Create a script named sitecustomize.py into your
python lib directory (i.e /usr/lib/python2.3) and add
the following code :
#---sitecustomize.py---
import sys
sys.setdefaultencoding('latin-1')
See u,
Lja
--- BRINER Cedric <[EMAIL PROTECTED]> wrote:
> python-2.3 apa
BRINER Cedric wrote:
print uses sys.stdout.encoding to encode unicode strings. You can check what
this is in your cgi with
import sys
print sys.stdout.encoding
didn't know
I think it will work to explicitly encode the unicode string in the encoding you want for the web
page. Try
print content.enc
BRINER Cedric wrote:
python-2.3 apache2
hi,
I'm trying to use unicode function into a cgi script with no success.
# cedric.py---
#!/usr/bin/python
import os,sys
import cgi
import cgitb; cgitb.enable()
print "Content-Type: text/html\
"+os.linesep+"\
"+os.linesep+"hipo'potame"
sys.stdout.flus
python-2.3 apache2
hi,
I'm trying to use unicode function into a cgi script with no success.
# cedric.py---
#!/usr/bin/python
import os,sys
import cgi
import cgitb; cgitb.enable()
print "Content-Type: text/html\
"+os.linesep+"\
"+os.linesep+"hipo'potame"
sys.stdout.flush()
content = u'c\xe