]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/UniClassObject.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / UniClassObject.py
index 764d95ec660b750ec69134bcaf03c30ab04bf157..9f6a2715668c0d590e5cd36211aac14aa6721f23 100644 (file)
@@ -5,13 +5,7 @@
 # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>\r
 #\r
 # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution.  The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 ##\r
 # Import Modules\r
@@ -24,7 +18,7 @@ from io import BytesIO
 from Common.BuildToolError import *\r
 from Common.StringUtils import GetLineNo\r
 from Common.Misc import PathClass\r
-from Common.LongFilePathSupport import LongFilePath, UniToStr\r
+from Common.LongFilePathSupport import LongFilePath\r
 from Common.GlobalData import *\r
 ##\r
 # Static definitions\r
@@ -99,12 +93,12 @@ LangConvTable = {'eng':'en', 'fra':'fr', \
 ## GetLanguageCode\r
 #\r
 # Check the language code read from .UNI file and convert ISO 639-2 codes to RFC 4646 codes if appropriate\r
-# ISO 639-2 language codes supported in compatiblity mode\r
+# ISO 639-2 language codes supported in compatibility mode\r
 # RFC 4646 language codes supported in native mode\r
 #\r
 # @param LangName:   Language codes read from .UNI file\r
 #\r
-# @retval LangName:  Valid lanugage code in RFC 4646 format or None\r
+# @retval LangName:  Valid language code in RFC 4646 format or None\r
 #\r
 def GetLanguageCode(LangName, IsCompatibleMode, File):\r
     length = len(LangName)\r
@@ -427,7 +421,7 @@ class UniFileClassObject(object):
                 if EndPos != -1 and EndPos - StartPos == 6 :\r
                     if g4HexChar.match(Line[StartPos + 2 : EndPos], re.UNICODE):\r
                         EndStr = Line[EndPos: ]\r
-                        UniStr = ('\u' + (Line[StartPos + 2 : EndPos])).decode('unicode_escape')\r
+                        UniStr = Line[StartPos + 2: EndPos]\r
                         if EndStr.startswith(u'\\x') and len(EndStr) >= 7:\r
                             if EndStr[6] == u'\\' and g4HexChar.match(EndStr[2 : 6], re.UNICODE):\r
                                 Line = Line[0 : StartPos] + UniStr + EndStr\r