From e8c8814da7bea8b74a4d1ee85ecb02e3d5124caa Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Wed, 6 Feb 2002 17:09:18 +0000 Subject: [PATCH] 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...) --- Lib/distutils/msvccompiler.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.47.3