I started by trying to store strings in sqlite using python, and got the message:
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unles
My unicode problems with Python 2.x (Python 2.7.6 to be specific) fixed this:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
It also solved the error you are mentioning right at the beginning of the post:
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless ...
EDIT
sys.setdefaultencoding
is a dirty hack. Yes, it can solve UTF-8 issues, but everything comes with a price. For more details refer to following links: