Revision: 19575
          http://sourceforge.net/p/edk2/code/19575
Author:   hchen30
Date:     2015-12-30 02:22:02 +0000 (Wed, 30 Dec 2015)
Log Message:
-----------
BaseTool/ECC: Add UTF-8 support on ECC tool

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <[email protected]>
Reviewed-by: Yonghong Zhu <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py

Modified: 
trunk/edk2/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py  
2015-12-29 09:07:32 UTC (rev 19574)
+++ trunk/edk2/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py  
2015-12-30 02:22:02 UTC (rev 19575)
@@ -2000,9 +2000,11 @@
     
     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 = ""
     


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to