diff options
author | Fan, ZhijuX <zhijux.fan@intel.com> | 2019-03-29 13:53:40 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-04-01 13:37:19 +0800 |
commit | 1c27ec42363515bda97468dccf57a01c6e66d01e (patch) | |
tree | 3694f14b657c8bc02b750eacf6ac2b5fa4ba6731 /BaseTools/Source/Python/Pkcs7Sign | |
parent | 58742d79457e71fba75d72e79050ba43915e3ed6 (diff) | |
download | edk2-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/Python/Pkcs7Sign')
-rw-r--r-- | BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py index 003f052a90..706bf28e14 100644 --- a/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py +++ b/BaseTools/Source/Python/Pkcs7Sign/Pkcs7Sign.py @@ -122,7 +122,7 @@ if __name__ == '__main__': if Process.returncode != 0:
print('ERROR: Open SSL command not available. Please verify PATH or set OPENSSL_PATH')
sys.exit(Process.returncode)
- print(Version[0].decode())
+ print(Version[0].decode(encoding='utf-8', errors='ignore'))
#
# Read input file into a buffer and save input filename
|