deelan <[EMAIL PROTECTED]> writes:
[...]
> query = "UPDATE blogs_news SET text = %s WHERE id=%s"
> cursor.execute(query, (text_extrated, id))
>
> so mysqldb will take care to quote text_extrated automatically. this
> may not not your problem, but it's considered "good style" when dealing
> with db
Hi.
Thank you both for your answers.
Finally I changed my MySQL table to UTF-8 and changed the structure
of the query (with '%s').
It works. Thank you very much.
2005/9/30, deelan <[EMAIL PROTECTED]>:
> thomas Armstrong wrote:
> (...)
> > when trying to execute a MySQL query:
> >
> > query
thomas Armstrong wrote:
(...)
> when trying to execute a MySQL query:
>
> query = "UPDATE blogs_news SET text = '" + text_extrated + "'WHERE
> id='" + id + "'"
> cursor.execute (query) #<--- error line
>
well, to start it's not the best way to do an update,
try this instead:
query = "U
Thomas Armstrong wrote:
> I'm trying to parse a UTF-8 document with special characters like
> acute-accent vowels:
>
>
> ...
> ---
>
> But I get this error message:
> ---
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in
> position 122: ordinal not in range(