mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-22 09:42:59 +02:00
Possible fix for unicode errors with non ascii path.
This commit is contained in:
parent
96415015a6
commit
4b2398255d
1 changed files with 2 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ def finalize(self):
|
|||
return self.ans
|
||||
|
||||
def _connect(path):
|
||||
if isinstance(path, unicode):
|
||||
path = path.encode('utf-8')
|
||||
conn = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES)
|
||||
conn.row_factory = lambda cursor, row : list(row)
|
||||
conn.create_aggregate('concat', 1, Concatenate)
|
||||
|
|
|
|||
Loading…
Reference in a new issue