Trying to fix unicode filename handling on Windows. Patch ported from 2.2.

svn: r9354
This commit is contained in:
Martin Hawlisch
2007-11-16 16:45:45 +00:00
parent 5cf5857bed
commit 802f0eb33f
6 changed files with 35 additions and 18 deletions

View File

@ -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())
#-------------------------------------------------------------------------
#
#