Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9635d0b

Browse files
committed
Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate.
1 parent 2d7bb3f commit 9635d0b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/distutils/msvccompiler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ def get_msvc_paths (path, version='6.0', platform='x86'):
117117
if string.upper(p) == path:
118118
V = string.split(v,';')
119119
for v in V:
120+
try:
121+
v = v.encode("mbcs")
122+
except UnicodeError:
123+
pass
120124
if v == '' or v in L: continue
121125
L.append(v)
122126
break

0 commit comments

Comments
 (0)