Fredrik Lundh wrote:
> [...]
> if you want more control of the replacement, you can skip the translate
> step and use your own error handler, e.g.
>
> charmap = ... see above ...
>
> def fixunicode(info):
> s = info.object[info.start:info.end]
> try:
> return
[EMAIL PROTECTED] wrote:
> > > 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
Hi Fredrik.
Thank you very much for your quick answer.
Do you suggest to change it by using regexp or must I encode the whole
texto into a suitable one?
Regards.
Fredrik Lundh wrote:
> "[EMAIL PROTECTED]"
>
> > I'm trying to store a text within a MySQL field (v 3.23.58) by
using
> > MySQLdb
> >
"[EMAIL PROTECTED]"
> 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,
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