Changeset 3237

Show
Ignore:
Timestamp:
07/11/2007 07:44:55 PM (1 year ago)
Author:
paul
Message:

Fixed some unicode issues in paths in 3 places in the framework, thanks to
Wolfram Hinderer in ticket #1083.

Tested on Linux (I watched it fail, then applied the patch, and watched
it succeed.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/stable/dabo/dApp.py

    r3088 r3237  
    721721            pthList = pth.strip(os.sep).split(os.sep) 
    722722            ret = ".".join(pthList) 
     723            ret = ret.decode(sys.getfilesystemencoding()) 
    723724        return ret 
    724725 
  • branches/stable/dabo/db/dbSQLite.py

    r3106 r3237  
    11# -*- coding: utf-8 -*- 
     2import sys 
    23import os 
    34import re 
     
    5152        self._dictCursorClass = DictCursor 
    5253        pth = os.path.expanduser(connectInfo.Database) 
     54        pth = pth.decode(sys.getfilesystemencoding()).encode("utf-8") 
    5355        self._connection = self.dbapi.connect(pth, factory=DictConnection) 
    5456        return self._connection 
  • branches/stable/dabo/lib/connParser.py

    r3084 r3237  
    11# -*- coding: utf-8 -*- 
     2import sys 
    23import xml.sax 
    34from StringIO import StringIO 
     
    6970                osp = os.path 
    7071                relpath = utils.resolvePath(val, pth, abspath=False) 
     72                pth = pth.decode(sys.getfilesystemencoding()) 
    7173                abspath = osp.abspath(osp.join(osp.split(pth)[0], relpath)) 
    7274                if osp.exists(abspath): 
  • trunk/dabo/dApp.py

    r3233 r3237  
    836836            pthList = pth.strip(os.sep).split(os.sep) 
    837837            ret = ".".join(pthList) 
     838            ret = ret.decode(sys.getfilesystemencoding()) 
    838839        return ret 
    839840 
  • trunk/dabo/db/dbSQLite.py

    r3217 r3237  
    11# -*- coding: utf-8 -*- 
     2import sys 
    23import os 
    34import re 
     
    5152        self._dictCursorClass = DictCursor 
    5253        pth = os.path.expanduser(connectInfo.Database) 
     54        pth = pth.decode(sys.getfilesystemencoding()).encode("utf-8") 
    5355        self._connection = self.dbapi.connect(pth, factory=DictConnection) 
    5456        return self._connection 
  • trunk/dabo/lib/connParser.py

    r3084 r3237  
    11# -*- coding: utf-8 -*- 
     2import sys 
    23import xml.sax 
    34from StringIO import StringIO 
     
    6970                osp = os.path 
    7071                relpath = utils.resolvePath(val, pth, abspath=False) 
     72                pth = pth.decode(sys.getfilesystemencoding()) 
    7173                abspath = osp.abspath(osp.join(osp.split(pth)[0], relpath)) 
    7274                if osp.exists(abspath):