os.path.expanduser doesn't handle Unicode when ~ expands to a non-ASCII path
Bug #242179 reported by
Jesús Corrius
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Moovida |
Fix Released
|
Undecided
|
Unassigned | ||
0.3 |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
os.path.expanduser (on both UNIX and Windows) doesn't handle Unicode when ~ expands to a non-ASCII path. Therefore, a byte string must be passed in and the result decoded:
home = os.path.
For example, in my home computer:
>>> import os.path
>>> os.path.
'C:\\Documents and Settings\\Jes\xfas'
>>> os.path.
'C:\Documents and Settings\Jesús'
Code like this in elisa/core/
DEFAULT_PLUGIN_DIR = os.path.
Related branches
Changed in elisa: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
instead of sys.getfilesyst emencoding( ) use locale. getdefaultlocal e()[1] or even better use system_encoding() from elisa.core. utils.locale_ helper emencoding( ) returns on win32 always 'mbcs' which is hardcoded in python.
sys.getfilesyst