[mod_python] One more UnicodeDecodeError

Flávio Ribeiro listas at flavioribeiro.com
Wed Jun 27 15:22:29 EDT 2007

Hi everyone,

Im new to mod_python psp development and im facing my first problem. I've
already saw some articles on the web but still doesnt fix my code.
Im trying to store some data in a mysql database using mysqldb plus
mod_python and when i put some text with accents (ã, ç, é, ...) into a form
input i receive an error:

File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 146, in execute
    query = query.encode(charset)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
52: ordinal not in range(128)

Im using:
Python 2.4.4c1
>>> MySQLdb.version_info
(1, 2, 1, 'final', 2)

Flávio Ribeiro
listas at flavioribeiro.com
(83) 9981.4441
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070627/4d815ae5/attachment.html

More information about the Mod_python mailing list