From 9635d0bd1fbf03f130b219e316662d1b38743a46 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= <martin@v.loewis.de>
Date: Tue, 29 Jan 2002 10:23:42 +0000
Subject: Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate.

---
 Lib/distutils/msvccompiler.py | 4 ++++
 1 file changed, 4 insertions(+)

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
-- 
cgit v0.12

