summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
authorFan, ZhijuX <zhijux.fan@intel.com>2019-03-29 13:53:40 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-04-01 13:37:19 +0800
commit1c27ec42363515bda97468dccf57a01c6e66d01e (patch)
tree3694f14b657c8bc02b750eacf6ac2b5fa4ba6731 /BaseTools/Source/C
parent58742d79457e71fba75d72e79050ba43915e3ed6 (diff)
downloadedk2-1c27ec42363515bda97468dccf57a01c6e66d01e.tar.gz
edk2-1c27ec42363515bda97468dccf57a01c6e66d01e.tar.bz2
edk2-1c27ec42363515bda97468dccf57a01c6e66d01e.zip
BaseTools:Coding problems caused by special characters
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1670 During BaseTools compiling under Chinese or Japanese language Windows, python exception occurring. UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in position 3528: ordinal not in range(128) Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/Makefiles/NmakeSubdirs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py
index 29bb5dfa72..abcbea89a4 100644
--- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.py
+++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.py
@@ -44,7 +44,7 @@ def RunCommand(WorkDir=None, *Args, **kwargs):
stdout, stderr = p.communicate()
message = ""
if stdout is not None:
- message = stdout.decode() #for compatibility in python 2 and 3
+ message = stdout.decode(encoding='utf-8', errors='ignore') #for compatibility in python 2 and 3
if p.returncode != 0:
raise RuntimeError("Error while execute command \'{0}\' in direcotry {1}\n{2}".format(" ".join(Args), WorkDir, message))