[issue13207] os.path.expanduser breaks when using unicode character in the username

2016-04-08 Thread Arkady “KindDragon” Shapkin
Arkady “KindDragon” Shapkin added the comment: At least Python 2.7 should return in locale.getpreferredencoding() encoding -- nosy: +Arkady “KindDragon” Shapkin ___ Python tracker

[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-26 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: Unicode environment vars work properly in Python 3.x on Windows, too, because the convertenviron() function in posixmodule.c uses extern _wenviron PyUnicode_FromWideChar() in Python 3.x. In Python 2.7, convertenviron() uses extern

[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Python 2 uses byte strings. If characters are not encodable to the ANSI code page, Windows replaces them by question marks. See the issue #13247 for another example (in Python 3 when using explicitly the bytes API). To be able to

[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-25 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13207 ___ ___

[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-18 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox title: os.path.expanduser brakes when using unicode character in the username - os.path.expanduser breaks when using unicode character in the username ___ Python tracker

[issue13207] os.path.expanduser breaks when using unicode character in the username

2011-10-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: On POSIX, Python 3 works correctly if my home dir is /tmp/éric, and Python 2.7 returns a UTF-8-encoded (not locale-encoded!) bytes string. For Windows, a patch would probably need to add a private function to the _nt module (in C): ctypes is