]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport loewis' checkin of revision 1.44:
authorMichael W. Hudson <mwh@python.net>
Wed, 6 Feb 2002 17:09:18 +0000 (17:09 +0000)
committerMichael W. Hudson <mwh@python.net>
Wed, 6 Feb 2002 17:09:18 +0000 (17:09 +0000)
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...)

Lib/distutils/msvccompiler.py

index 8a67dfc823dc2a32bbd9eb5428329cdd07eb5cfe..35336642ae704f6f86e9ae13d3392acba59dbf42 100644 (file)
@@ -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