Py 3: How to switch application to Unicode strings?

Gnarlodious gnarlodious at gmail.com
Tue Jan 19 23:16:40 EST 2010


Well, Python 3 is supposed to be all Unicode by default. I shouldn't
even need to say
# coding:UTF-8

And, the file is saved as Unicode.

There are many mentions of this error found by Google, but none seen
to clearly say what the problem is or how to fix it.

FYI, the problem line says:

cursor.execute('insert into Data values
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', frameTuple)

and one of the strings in the tuple contains a character like 'ñ'.
I have a version of the SQLite editor that works as expected in a
browser, I don't know why.

-- Gnarlie



More information about the Python-list mailing list