G
Gaurav Veda
Hi,
I am trying to put some webpages into a mysql database using python
(after some processing on the text). If I use Python 2.4.2, it works
without a fuss. However, on Python 2.5, I get the following error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
4357: ordinal not in range(128)
Before sending the (insert) query to the mysql server, I do the
following which I think should've taken care of this problem:
sqlStr = sqlStr.replace('\\', '\\\\')
(where sqlStr is the query).
Any suggestions?
Thanks!
Gaurav
I am trying to put some webpages into a mysql database using python
(after some processing on the text). If I use Python 2.4.2, it works
without a fuss. However, on Python 2.5, I get the following error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
4357: ordinal not in range(128)
Before sending the (insert) query to the mysql server, I do the
following which I think should've taken care of this problem:
sqlStr = sqlStr.replace('\\', '\\\\')
(where sqlStr is the query).
Any suggestions?
Thanks!
Gaurav