utf-8 encoding & python & mysql!
"zeegco" <[email protected]>
| Newsgroups | gmane.text.clearsilver.general |
|---|---|
| Message-ID | <[email protected]> |
hi everybody,
I use clearsilver as my template engine for my site and my coding
language is python2.4,
when i set "utt-8" as default charset in my template (code: <meta
http-equiv="Content-Type" content="text/html; charset=utf-8" />)
, when i want to store form values in my db (mysql), I give this error:
'''
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position
31: ordinal not in range(128)
args = ('ascii', "call
storeIt('1','yqnjt6ca','\xd8\xb3\xd9\x84\xd8\xa7\xd9\x85
\xd8\xb9\xd9\x85\xd9\x88',...453000','2007-12-04
15:05:08.453000','127.0.0.1')", 31, 32, 'ordinal not in range(128)')
encoding = 'ascii'
end = 32
object = "call
storeIt('1','yqnjt6ca','\xd8\xb3\xd9\x84\xd8\xa7\xd9\x85
\xd8\xb9\xd9\x85\xd9\x88',...453000','2007-12-04
15:05:08.453000','127.0.0.1')"
reason = 'ordinal not in range(128)'
start = 31
'''
how can I solve this problem?