This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shura_zam
Recipients shura_zam
Date 2009-09-01.07:51:15
SpamBayes Score 0.0002853536
Marked as misclassified No
Message-id <1251791477.43.0.253856390345.issue6815@psf.upfronthosting.co.za>
In-reply-to
Content
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]
History
Date User Action Args
2009-09-01 07:51:17shura_zamsetrecipients: + shura_zam
2009-09-01 07:51:17shura_zamsetmessageid: <1251791477.43.0.253856390345.issue6815@psf.upfronthosting.co.za>
2009-09-01 07:51:15shura_zamlinkissue6815 messages
2009-09-01 07:51:15shura_zamcreate