Bug 85409

Summary: encode problem with accents in some feeds
Product: [Applications] akregator Reporter: Abelardo Garcia <bisley>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: madcoder
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Abelardo Garcia 2004-07-17 23:09:41 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

I see accents in article name but not in article view, but if i click on "Complete Story" to see it in another tab in akregator, i can see accents well.
-> http://googlemania.com/rss.php  "Google promociona Picasa"

In this case articles see well but feed name have problems when i added it to akregator.
-> http://programacionlogica.blogspot.com/atom.xml
Comment 1 Frank Osterfeld 2004-08-02 19:46:46 UTC
I can confirm these problems:

http://googlemania.com/rss.php

In titles, special characters are encoded for example like "&amp;aacute;", in the item content like "&aacute;". The special characters are omitted in the article viewer.

http://programacionlogica.blogspot.com/atom.xml

Here both feed title and article contents are encoded in the "&amp;aacute;" way. Articles are displayed properly, in the feed title, only "&amp;" is replaced by "&":
"Programaci&oacute;n L&oacute;gica y Recuperaci&oacute;n de Informaci&oacute;n"
Comment 2 Stanislav Karchebny 2004-08-04 01:04:31 UTC
*** Bug 86533 has been marked as a duplicate of this bug. ***
Comment 3 Frank Osterfeld 2004-10-09 22:44:36 UTC
CVS commit by osterfeld: 

- set item text properly when adding feeds via dcop (konq plugin)
- resolve entities which are encoded in the &amp;someentity; way by calling resolveEntities two times.

CCMAIL: 85409-done@bugs.kde.org


  M +8 -5      feed.cpp   1.50


--- kdenonbeta/akregator/src/feed.cpp  #1.49:1.50
@@ -11,12 +11,12 @@
 #include "fetchtransaction.h"
 
-
-#include <kurl.h>
+#include <kapplication.h>
+#include <kcharsets.h>
 #include <kdebug.h>
 #include <kglobal.h>
-#include <kstandarddirs.h>
 #include <kiconloader.h>
 #include <kiconeffect.h>
-#include <kapplication.h>
+#include <kstandarddirs.h>
+#include <kurl.h>
 
 #include <qtimer.h>
@@ -378,5 +378,8 @@ void Feed::fetchCompleted(Loader *l, Doc
 
     if (title().isEmpty()) 
-        setTitle( m_document.title() );
+        setTitle( KCharsets::resolveEntities(KCharsets::resolveEntities(m_document.title())) );
+
+    if (item())
+        item()->setText(0, title()); // this is necessary for adding feeds via konq plugin
 
     m_description = m_document.description();