Bug 116320

Summary: khtml forgets encoding when going back in site history
Product: [Applications] konqueror Reporter: Wilbert Berendsen <wbsoft>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aceler, adarovsky, arvidjaar, droid, filip, maksim, nerijus, ralf.hildebrandt
Priority: NOR    
Version: 3.4.92   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Wilbert Berendsen 2005-11-14 07:47:17 UTC
Version:           3.4.92 (using KDE 3.5 (RC1), Gentoo)
Compiler:          gcc version 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.14-gentoo

When navigating a site that uses utf-8 encoding, the encoding is lost when I go back in the site history. The utf-8 text is displayed as iso-8859-x (possibly my local encoding).

Try: http://sf.euweb.cz/ . Click on the name of an article, and then go back. The text is then shown all garbled.

I use kdelibs from 3.5.0_rc1.
Comment 1 Wilbert Berendsen 2005-11-14 07:53:16 UTC
I must say the site's html is buggy: there is a lot of banner-html before the real <html> element opens. Maybe that's the reason konqueror forgets the utf-8 encoding.
Comment 2 Andrey Golovizin 2005-11-30 11:11:59 UTC
kde-3.5.0, got the same (mis)behaviour with linux.org.ru
Strange bug, indeed. Some sites with utf-8 encoding work as expexted (say, gentoo.ru), the others are broken (linux.org.ru, etc.)
Comment 3 Valery Kartel 2005-12-02 20:53:17 UTC
The same since 3.5beta1 to 3.5 release.

there was no problem with 3.4 .. 3.3 .... anv lower versions ...

http://linux.org.ru  as example ...


Comment 4 Filip Papadopoulos 2005-12-07 01:18:36 UTC
Yes i found the same problem with a Greek site  http://www.epe.org.gr/
If u follow a link and then press the "Back" button the encoding gets messed...
Note that the aforementioned site has Valid HTML and Valid CSS.
Comment 5 Maksim Orlovich 2005-12-07 19:10:57 UTC
SVN commit 486394 by orlovich:

Don't loose server-specified encoding info when going back in history
BUG:116320


 M  +2 -0      khtml_part.cpp  


--- branches/KDE/3.5/kdelibs/khtml/khtml_part.cpp #486393:486394
@@ -1667,7 +1667,9 @@
   {
      long saveCacheId = d->m_cacheId;
      QString savePageReferrer = d->m_pageReferrer;
+     QString saveEncoding     = d->m_encoding;
      begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
+     d->m_encoding     = saveEncoding;
      d->m_pageReferrer = savePageReferrer;
      d->m_cacheId = saveCacheId;
      d->m_workingURL = KURL();
Comment 6 Tommi Tervo 2005-12-08 11:25:05 UTC
*** Bug 117917 has been marked as a duplicate of this bug. ***
Comment 7 Maksim Orlovich 2005-12-19 03:09:58 UTC
*** Bug 118615 has been marked as a duplicate of this bug. ***
Comment 8 Thiago Macieira 2005-12-29 15:33:02 UTC
*** Bug 119165 has been marked as a duplicate of this bug. ***
Comment 9 Thiago Macieira 2005-12-29 21:00:40 UTC
*** Bug 119187 has been marked as a duplicate of this bug. ***
Comment 10 Tommi Tervo 2006-05-11 22:22:09 UTC
*** Bug 127172 has been marked as a duplicate of this bug. ***