Handle errors when processing data from SQLite.

Some errors could be related to encoding issues, as in #99.
In passing docs formating fix.
Allow specifying the SQLite text encoding, fix #99.