dabo Commit
Revision 6495
Date: 2011-03-14 13:35:42 -0700 (Mon, 14 Mar 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6495
Changed:
U trunk/dabo/db/dbSQLite.py
Log:
Fix for mbcs to uinicode conversion error on Windows platform.
Diff:
Modified: trunk/dabo/db/dbSQLite.py
===================================================================
--- trunk/dabo/db/dbSQLite.py 2011-03-11 11:36:52 UTC (rev 6494)
+++ trunk/dabo/db/dbSQLite.py 2011-03-14 20:35:42 UTC (rev 6495)
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
import sys
import os
import re
@@ -66,7 +66,9 @@
if not os.path.exists(pth):
# Database file does not exist; raise an error
raise DBFileDoesNotExistException(_("Database
file '%s' does not exist") % pth)
- pth = pth.decode(dabo.fileSystemEncoding).encode("utf-8")
+ if sys.platform not in ("win32",):
+ # On Windows, path is alredy unicode.
+ pth =
pth.decode(dabo.fileSystemEncoding).encode("utf-8")
# Need to specify "isolation_level=None" to have transactions
working correctly.
self._connection = self.dbapi.connect(pth,
factory=DictConnection, isolation_level=None)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]