summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-01-29 10:23:42 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-01-29 10:23:42 (GMT)
commit9635d0bd1fbf03f130b219e316662d1b38743a46 (patch)
tree02bdc79cc09b4a2d789f880f727caafdc725c7b2 /Lib/distutils
parent2d7bb3fa66b55c1af283b51853abe7f62a2a5f49 (diff)
downloadcpython-9635d0bd1fbf03f130b219e316662d1b38743a46.zip
cpython-9635d0bd1fbf03f130b219e316662d1b38743a46.tar.gz
cpython-9635d0bd1fbf03f130b219e316662d1b38743a46.tar.bz2
Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/msvccompiler.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py
index 8a67dfc..3533664 100644
--- a/Lib/distutils/msvccompiler.py
+++ b/Lib/distutils/msvccompiler.py
@@ -117,6 +117,10 @@ def get_msvc_paths (path, version='6.0', platform='x86'):
if string.upper(p) == path:
V = string.split(v,';')
for v in V:
+ try:
+ v = v.encode("mbcs")
+ except UnicodeError:
+ pass
if v == '' or v in L: continue
L.append(v)
break