Changeset 1717
- Timestamp:
- 27.10.2011 22:03:04 (7 months ago)
- File:
-
- 1 edited
-
ZMS/trunk/_fileutil.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/_fileutil.py
r1611 r1717 102 102 if type( path) is str: 103 103 path = unicode(path, 'latin-1') 104 path = path.encode('ascii', 'replace') # replace uncodable characters by ? (63) 104 if os.name != "nt": 105 path = path.encode('ascii', 'replace') # replace uncodable characters by ? (63) 105 106 if len( chs) > 0: 106 107 for ch in chs: … … 190 191 mode = os.stat(local_filename)[stat.ST_MODE] 191 192 if filter is None or fnmatch.fnmatch(filename, filter): 193 u_local_filename = local_filename 194 if type(u_local_filename) is not unicode: 195 u_local_filename = unicode(local_filename,'latin-1') 192 196 d = {} 193 d['local_filename']=u nicode(local_filename,'latin-1').encode('utf-8')194 d['filename']= unicode(extractFilename(local_filename),'latin-1').encode('utf-8')197 d['local_filename']=u_local_filename.encode('utf-8') 198 d['filename']=extractFilename(u_local_filename).encode('utf-8') 195 199 if stat.S_ISDIR(mode): 196 200 mtime = os.path.getmtime( local_filename)
Note: See TracChangeset
for help on using the changeset viewer.
