Bug 94932 - The sidebar in konqueror has wrong encoding
Summary: The sidebar in konqueror has wrong encoding
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.2-beta2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-11 17:15 UTC by pierre
Modified: 2006-06-11 12:32 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 pierre 2004-12-11 17:15:37 UTC
Version:           1.2-beta2 (using KDE 3.3.2 Level "a" , unofficial build of SUSE )
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.111.5-default

Hi

I installed the new amarok 1.2 beta 2 yesterday : it's extremely good ! :)
But there is a problem with the konqueror sidebar : its encoding is wrong. It is iso-8859-15 while it should be utf-8...
This problem isn't present in the context sidebar in amarok itself...
Comment 1 Stefan Briesenick 2005-02-16 02:39:30 UTC
I can confirm this problem.
Comment 2 Marco Gulino 2005-02-22 16:19:30 UTC
CVS commit by gulino: 


BUG:94932
amaroK Konqueror Sidebar encoding is now UTF8.


  M +1 -0      universalamarok.cpp   1.14


--- kdeextragear-1/amarok/src/konquisidebar/universalamarok.cpp  #1.13:1.14
@@ -163,4 +163,5 @@ void UniversalAmarok::updateBrowser(cons
     browser->openURL(file);
     browser->end();
+    browser->setEncoding("utf8", true);
 }
 


Comment 3 Vitaliy R 2005-02-22 20:23:25 UTC
The patch works only if your local codepage is UTF-8. In general, you shoud set local encoding - in my case the line should be like:
browser->setEncoding("koi8-r", true);
- for cyrillic KOI8-R codepage.
Comment 4 Marco Gulino 2005-02-22 21:21:29 UTC
Re-fixed... so, can someone test this time please?
Comment 5 Stefan Siegel 2005-02-24 00:04:58 UTC
CVS commit by siegel: 

Always use utf8 for Google and the Konqueror sidebar
CCMAIL: amarok-devel@lists.sf.net


  M +4 -3      contextbrowser.cpp   1.368
  M +1 -3      konquisidebar/universalamarok.cpp   1.17


--- kdeextragear-1/amarok/src/konquisidebar/universalamarok.cpp  #1.16:1.17
@@ -83,4 +83,5 @@ UniversalAmarok::UniversalAmarok(KInstan
 kdDebug() << "parentPart() << " << browser->parentPart() << endl;
     browser->setDNDEnabled( true );
+    browser->setEncoding("utf8", true);
     updateBrowser(HTML_FILE);
 browser->view()->installEventFilter(widget);
@@ -154,8 +155,5 @@ extern "C"
 void UniversalAmarok::updateBrowser(const QString& file)
 {
-    browser->begin();
     browser->openURL(file);
-    browser->end();
-    browser->setEncoding(KGlobal::locale()->encoding(), true);
 }
 

--- kdeextragear-1/amarok/src/contextbrowser.cpp  #1.367:1.368
@@ -342,4 +342,5 @@ void ContextBrowser::saveHtmlData()
     exportedDocument.open(IO_WriteOnly);
     QTextStream stream( &exportedDocument );
+    stream.setEncoding( QTextStream::UnicodeUTF8 );
     stream << m_HTMLSource // the pure html data..
         .replace("<html>",QString("<html><head><style type=\"text/css\">%1</style></head>").arg(m_styleSheet) ); // and the stylesheet code
@@ -1482,7 +1483,7 @@ void ContextBrowser::showLyrics( const Q
             KURL::encode_string_no_slash( EngineController::instance()->bundle().album() ),
             KURL::encode_string_no_slash( EngineController::instance()->bundle().year() ) );
-    m_lyricSearchUrl = QString( "externalurl://www.google.com/search?q=lyrics \"%1\" \"%2\"" )
-        .arg( KURL::encode_string_no_slash( EngineController::instance()->bundle().artist() ),
-              KURL::encode_string_no_slash( title ) );
+    m_lyricSearchUrl = QString( "externalurl://www.google.com/search?ie=UTF-8&q=lyrics \"%1\" \"%2\"" )
+        .arg( KURL::encode_string_no_slash( EngineController::instance()->bundle().artist(), 106 /*utf-8*/ ),
+              KURL::encode_string_no_slash( title, 106 /*utf-8*/ ) );
 
     KIO::TransferJob* job = KIO::get( url, false, false );

Comment 6 Funda Wang 2005-11-01 12:14:22 UTC
Are you sure this is fixed? I'm using amaroK 1.3.5 in Mandriva cooker, and the encoding is still wrong.
Comment 7 Janet 2006-01-03 02:06:23 UTC
I can confirm this: in amaroK 1.3.6 Debian Sid/Kanotix the enconding of the konq sidebar is still wrong, german umlauts are displayed as some weird keys, e.g. StÃŒck instead of Stück in amaroK's own sidebar. My system's enconding is iso-8859-15 and only konqueror's amaroK sidebar seems to use another enconding. Why does it not use the same enconding amaroK itself uses?
Comment 8 Peter Paulsen 2006-01-19 01:40:18 UTC
Can you please reopen the bug report - the problem is not solved.
Comment 9 Janet 2006-03-29 19:56:00 UTC
The enconding still is wrong in KDE 3.5.1 (Kanotix/Debian Sid)/amaroK 1.4 SVN, this is definitely *not* fixed.