diff options
author | Hess Chen <hesheng.chen@intel.com> | 2017-04-01 13:33:04 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-04-05 10:45:50 +0800 |
commit | 09e27ac559c5538a0b86afb0b056ef2a3f705483 (patch) | |
tree | 8e5efe1efac6042166f88b603dbf7b85baa8c170 /BaseTools/Source/Python/UPT/UPT.py | |
parent | 5692fa883f4e2583bbef9aae4082b87515ae51e1 (diff) | |
download | edk2-09e27ac559c5538a0b86afb0b056ef2a3f705483.tar.gz edk2-09e27ac559c5538a0b86afb0b056ef2a3f705483.tar.bz2 edk2-09e27ac559c5538a0b86afb0b056ef2a3f705483.zip |
BaseTools/UPT: Support Unicode path
Update the IpiDb.py to support Unicode path for localization
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/UPT/UPT.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/UPT.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/UPT/UPT.py b/BaseTools/Source/Python/UPT/UPT.py index 873492d4f0..d98b469640 100644 --- a/BaseTools/Source/Python/UPT/UPT.py +++ b/BaseTools/Source/Python/UPT/UPT.py @@ -19,8 +19,13 @@ UPT ## import modules
#
-from Core import FileHook
+import locale
import sys
+encoding = locale.getdefaultlocale()[1]
+if encoding:
+ reload(sys)
+ sys.setdefaultencoding(encoding)
+from Core import FileHook
import os.path
from sys import platform
import platform as pf
|