MySQL: 'latin-1' codec can't encode character

francescomoi at europe.com francescomoi at europe.com
Fri May 13 09:25:48 EDT 2005


Hi.

I'm trying to store a text within a MySQL field (v 3.23.58) by using
MySQLdb
(v 1.2.1c3).

The text is: "telephone..." (note the last character)

And I get this error message:
-----------
File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line
33, in defaulterrorhandler
    raise errorclass, errorvalue
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2026' in
position 288: ordinal not in range(256)
-----------------------

Position 288 is the character I've mentioned. I suppose I must encode
this caracter
into a right one which MySQL could store, but I have no idea about how
to perform
it. Any suggestion?

Thank you very much.




More information about the Python-list mailing list