Can I get SQLite to string instead of unicode for TEXT in Python? Can I get SQLite to string instead of unicode for TEXT in Python? sqlite sqlite

Can I get SQLite to string instead of unicode for TEXT in Python?


On further inspection of the Python SQLite API, I found this little bit:

http://docs.python.org/library/sqlite3.html#sqlite3.Connection.text_factory

Case closed.


TEXT is intended to store text. Use BLOB if you want to store bytes.


Use Python 3.2+. It will automatically return string instead of unicode (as in Python 2.7)