New submission from Pascal Garcia: The name of the user contains accents under windows.
This error occurs when using the function. expaduser("~") UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 10: ordinal not in range(128) ascii is the default encoding as sys.getdefaultencoding() If in site.py "I enable Enable the support locale" then de defaultencoding become cp1252 and the function works. Expand user should use the encoding used by the system (may be locale.getdefaultlocale()) to decode path given by the system instead of the default encoding the should be the target encoding. I do beleave some other functions may be concerned by this problem. I detect the problem on Windows (WP and 7), but I do beleave the problem may happen on Linux also. ---------- components: Library (Lib) messages: 190850 nosy: plgarcia priority: normal severity: normal status: open title: os.path.expanduser does not use the system encoding versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18171> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com