[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/librss
From:       Frerich Raabe <raabe () kde ! org>
Date:       2004-12-14 17:05:52
Message-ID: 20041214170552.18D9D1B9B2 () office ! kde ! org
[Download RAW message or body]

CVS commit by raabe: 

- Backporting the fix for RSS files generates by Microsoft-tools (backporting
  from aKregator's copy of librss, that is).


  M +9 -0      loader.cpp   1.13


--- kdenetwork/librss/loader.cpp  #1.12:1.13
@@ -256,4 +256,13 @@ void Loader::slotRetrieverDone(const QBy
                 }
 
+                /* It seems that some Microsoft-developed code generates UTF-8 files
+                 * with the three leading unicode characters 0357, 0273, 0277. For
+                 * an example, check http://msd.microsoft.com/rss.xml
+                 */
+                if (len > 3 && QChar(*charData) == QChar(0357)) {
+                        len -= 3;
+                        charData += 3;
+                }
+
                 QByteArray tmpData;
                 tmpData.setRawData(charData, len);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic