Removed the unnecessary extra conversion of "\r\n".
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 25 Jan 2008 02:22:12 +0000 (02:22 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 25 Jan 2008 02:22:12 +0000 (02:22 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@975 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/AutoGen/UniClassObject.py

index 1d733e7..8660465 100644 (file)
@@ -175,7 +175,7 @@ class UniFileClassObject(object):
                 continue\r
             else:\r
                 Language = LanguageList[IndexI].split()[0]\r
-                Value = LanguageList[IndexI][LanguageList[IndexI].find(u'\"') + len(u'\"') : LanguageList[IndexI].rfind(u'\"')].replace(u'\r\n', u'')\r
+                Value = LanguageList[IndexI][LanguageList[IndexI].find(u'\"') + len(u'\"') : LanguageList[IndexI].rfind(u'\"')] #.replace(u'\r\n', u'')\r
                 self.AddStringToList(Name, Language, Value)\r
     \r
     #\r
@@ -279,15 +279,15 @@ class UniFileClassObject(object):
             if Line.find(u'#string ') >= 0 and Line.find(u'#language ') < 0 and \\r
                 SecondLine.find(u'#string ') < 0 and SecondLine.find(u'#language ') >= 0 and \\r
                 ThirdLine.find(u'#string ') < 0 and ThirdLine.find(u'#language ') < 0:\r
-                Name = Line[Line.find(u'#string ') + len(u'#string ') : ].strip()\r
-                Language = SecondLine[SecondLine.find(u'#language ') + len(u'#language ') : ].strip()\r
+                Name = Line[Line.find(u'#string ') + len(u'#string ') : ].strip(' ')\r
+                Language = SecondLine[SecondLine.find(u'#language ') + len(u'#language ') : ].strip(' ')\r
                 for IndexJ in range(IndexI + 2, len(Lines)):\r
                     if Lines[IndexJ].find(u'#string ') < 0 and Lines[IndexJ].find(u'#language ') < 0:\r
                         Value = Value + Lines[IndexJ]\r
                     else:\r
                         IndexI = IndexJ\r
                         break\r
-                Value = Value.replace(u'\r\n', u'')\r
+                Value = Value.replace(u'\r\n', u'')\r
                 self.AddStringToList(Name, Language, Value)\r
                 continue\r
 \r