## @file\r
# Collect all defined strings in multiple uni files.\r
#\r
-# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2019, 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
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
ExtraData='''The line %s misses '"' at the end of it in file %s'''\r
% (LineCount, File.Path))\r
+\r
+ #\r
+ # Check the situation that there has more than 2 '"' for the language entry\r
+ #\r
+ if Line.strip() and Line.replace(u'\\"', '').count(u'"') > 2:\r
+ EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
+ ExtraData='''The line %s has more than 2 '"' for language entry in file %s'''\r
+ % (LineCount, File.Path))\r
+\r
elif Line.startswith(u'#language'):\r
if StringEntryExistsFlag == 2:\r
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
else:\r
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
elif Line.startswith(u'"'):\r
- #\r
- # Check the situation that there has more than 2 '"' for the language entry\r
- #\r
- if Line.replace(u'\\"', '').count(u'"') > 2:\r
- EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID,\r
- ExtraData='''The line %s has more than 2 '"' for language entry in file %s'''\r
- % (LineCount, File.Path))\r
if u'#string' in Line or u'#language' in Line:\r
EdkLogger.Error("Unicode File Parser", ToolError.FORMAT_INVALID, ExtraData=File.Path)\r
NewLines.append(Line)\r