Trying to fix unicode filename handling on Windows. Patch ported from 2.2.
svn: r9354
This commit is contained in:
14
src/Utils.py
14
src/Utils.py
@ -327,6 +327,20 @@ def find_folder( filename):
|
||||
# not found
|
||||
return ''
|
||||
|
||||
def get_unicode_path(path):
|
||||
"""
|
||||
Return the Unicode version of a path string.
|
||||
|
||||
@type path: str
|
||||
@param path: The path to be converted to Unicode
|
||||
@rtype: unicode
|
||||
@return: The Unicode version of path.
|
||||
"""
|
||||
if os.sys.platform == "win32":
|
||||
return unicode(path)
|
||||
else:
|
||||
return unicode(path,sys.getfilesystemencoding())
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
Reference in New Issue
Block a user