"Stephen Hansen" <apt.shan...@gmail.com> wrote in message news:7a9c25c21001191156j46a7fdadt58b728477b85e...@mail.gmail.com...
On Tue, Jan 19, 2010 at 7:50 AM, Gnarlodious <gnarlodi...@gmail.com> wrote:

I am using Python 3, getting an error from SQLite:

sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless
you use a text_factory that can interpret 8-bit bytestrings (like
text_factory = str). It is highly recommended that you instead just
switch your application to Unicode strings.

So... how do I switch to Unicode? I thought I was doing it when I put

# coding:utf-8

at the start of my script.


All that does is mean that the script itself is encoded as utf8.


Actually it means that the user has declared that the source file is encoded in utf-8. A common source of errors is that the source file is *not* encoded in utf-8. Make sure to save the source file in the encoding declared.

-Mark

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to