diff options
author | Hess Chen <hesheng.chen@intel.com> | 2015-12-30 02:22:02 +0000 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-02-24 15:29:22 +0800 |
commit | c72f8b3ee6ad1936831f42b37a09065daad1e0eb (patch) | |
tree | b2700634213191f31bb6c8ebaccbd7a40872b867 /BaseTools/Source | |
parent | 7b9d00aca0221ca24190a5d899c6b58490674c99 (diff) | |
download | edk2-platforms-c72f8b3ee6ad1936831f42b37a09065daad1e0eb.tar.xz |
BaseTool/ECC: Add UTF-8 support on ECC tool
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19575 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 975889279df2eb3d3338cb88afb3faa71ddde4d6)
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index 123d694939..aaea1ab3fc 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -2000,9 +2000,11 @@ class UniParser(object): def __read(self):
try:
- self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode = 'rb', Encoding = 'utf_16').read()
+ self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_8').read()
except UnicodeError:
- self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode = 'rb', Encoding = 'utf_16_le').read()
+ self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_16').read()
+ except UnicodeError:
+ self.FileIn = CodecOpenLongFilePath(self.FilePath, Mode='rb', Encoding='utf_16_le').read()
except IOError:
self.FileIn = ""
|