New submission from Alexandr Zamaraev <shura_...@users.sourceforge.net>:
OS Windows Vista Home Basic Ru + sp2 Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Simple code to crach (file expandvars_bug.py): [code] # -*- coding: cp1251 -*- import os.path var = r'C:\Вася\Microsoft' print os.path.expandvars(var) print os.path.expandvars(unicode(var)) [/code] Console session: [code] C:\┬рё \Microsoft Traceback (most recent call last): File "C:\Lang\test\python\expandvars_bug.py", line 6, in <module> print os.path.expandvars(unicode(var)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) [/code] ---------- components: Unicode messages: 92124 nosy: shura_zam severity: normal status: open title: UnicodeDecodeError in os.path.expandvars type: crash versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com