mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
older pysqlite can't auto-convert unicode to utf-8
This commit is contained in:
parent
65bc9ec3f2
commit
b36b670043
1 changed files with 4 additions and 2 deletions
|
@ -110,7 +110,8 @@ class Sync(QThread):
|
|||
try:
|
||||
if deck:
|
||||
# multi-mode setup
|
||||
c = sqlite.connect(deck)
|
||||
sqlpath = deck.encode("utf-8")
|
||||
c = sqlite.connect(sqlpath)
|
||||
(syncName, localMod, localSync) = c.execute(
|
||||
"select syncName, modified, lastSync from decks").fetchone()
|
||||
c.close()
|
||||
|
@ -120,7 +121,8 @@ class Sync(QThread):
|
|||
else:
|
||||
syncName = self.parent.syncName
|
||||
path = self.parent.deckPath
|
||||
c = sqlite.connect(path)
|
||||
sqlpath = path.encode("utf-8")
|
||||
c = sqlite.connect(sqlpath)
|
||||
(localMod, localSync) = c.execute(
|
||||
"select modified, lastSync from decks").fetchone()
|
||||
c.close()
|
||||
|
|
Loading…
Reference in a new issue