Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes Issue #264 - sqlite utf-8 in db.insert function

  • Loading branch information...
commit 809eeb08d9a8d900e141fccdf8386a55e3583a19 1 parent cf66831
Larpon authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  web/db.py
3  web/db.py
View
@@ -1015,7 +1015,8 @@ def __init__(self, **keywords):
if db.__name__ in ["sqlite3", "pysqlite2.dbapi2"]:
db.paramstyle = 'qmark'
-
+ if db.__name__ in ["sqlite3"]:
+ db.register_adapter( str, lambda s:s.decode( 'utf-8' ) )
# sqlite driver doesn't create datatime objects for timestamp columns unless `detect_types` option is passed.
# It seems to be supported in sqlite3 and pysqlite2 drivers, not surte about sqlite.
keywords.setdefault('detect_types', db.PARSE_DECLTYPES)
Please sign in to comment.
Something went wrong with that request. Please try again.