## @file\r
# Collect all defined strings in multiple uni files.\r
#\r
-# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
Lang = distutils.util.split_quoted((Line.split(u"//")[0]))\r
if len(Lang) != 3:\r
try:\r
+ FileIn = codecs.open(File.Path, mode='rb', encoding='utf_8').read()\r
+ except UnicodeError, Xstr:\r
FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16').read()\r
except UnicodeError, Xstr:\r
FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16_le').read()\r
#\r
# Check file header of the Uni file\r
#\r
- if not CheckUTF16FileHeader(File.Path):\r
- EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
- ExtraData='The file %s is either invalid UTF-16LE or it is missing the BOM.' % File.Path)\r
+# if not CheckUTF16FileHeader(File.Path):\r
+# EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
+# ExtraData='The file %s is either invalid UTF-16LE or it is missing the BOM.' % File.Path)\r
\r
try:\r
+ FileIn = codecs.open(File.Path, mode='rb', encoding='utf_8').read()\r
+ except UnicodeError, Xstr:\r
FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16').readlines()\r
except UnicodeError:\r
FileIn = codecs.open(File.Path, mode='rb', encoding='utf_16_le').readlines()\r
ToolError.FILE_NOT_FOUND,\r
ExtraData=FilaPath)\r
try:\r
+ FileIn = codecs.open(FilaPath, mode='rb', encoding='utf_8').read()\r
+ except UnicodeError, Xstr:\r
FileIn = codecs.open(FilaPath, mode='rb', encoding='utf_16').readlines()\r
except UnicodeError:\r
FileIn = codecs.open(FilaPath, mode='rb', encoding='utf_16_le').readlines()\r