summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/UPT/UPT.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/UPT/UPT.py')
-rw-r--r--BaseTools/Source/Python/UPT/UPT.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/UPT/UPT.py b/BaseTools/Source/Python/UPT/UPT.py
index 930a8c1d4c..004fc5ff2f 100644
--- a/BaseTools/Source/Python/UPT/UPT.py
+++ b/BaseTools/Source/Python/UPT/UPT.py
@@ -21,6 +21,10 @@ UPT
#
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