diff options
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
|