From: Michael W. Hudson Date: Wed, 6 Feb 2002 17:09:18 +0000 (+0000) Subject: Backport loewis' checkin of revision 1.44: X-Git-Tag: v2.2.1c1~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8c8814da7bea8b74a4d1ee85ecb02e3d5124caa;p=thirdparty%2FPython%2Fcpython.git 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...) --- diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 8a67dfc823dc..35336642ae70 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