Bug 85409 - encode problem with accents in some feeds
Summary: encode problem with accents in some feeds
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 86533 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-17 23:09 UTC by Abelardo Garcia
Modified: 2004-10-09 22:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 "á", in the item content like "á". 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 "á" way. Articles are displayed properly, in the feed title, only "&" is replaced by "&":
"Programación Lógica y Recuperación de Informació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 &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();