summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-02-06 17:09:18 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-02-06 17:09:18 (GMT)
commite8c8814da7bea8b74a4d1ee85ecb02e3d5124caa (patch)
treeca092f4ca5a0583b6dcc4314a10ca99ba30261b9
parentfa338d7fad1c2e9f1c16849e9eac59ccfe9d878b (diff)
downloadcpython-e8c8814da7bea8b74a4d1ee85ecb02e3d5124caa.zip
cpython-e8c8814da7bea8b74a4d1ee85ecb02e3d5124caa.tar.gz
cpython-e8c8814da7bea8b74a4d1ee85ecb02e3d5124caa.tar.bz2
Backport loewis' checkin of revision 1.44:
Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate. (apparently 1.5.2 compatibility is still a goal for distutils, but I'll wait until that gets amended on the trunk...)
-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