Summary: | The sidebar in konqueror has wrong encoding | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | pierre <pierre.linux59> |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fundawang |
Priority: | NOR | ||
Version: | 1.2-beta2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
pierre
2004-12-11 17:15:37 UTC
I can confirm this problem. 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); } 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. Re-fixed... so, can someone test this time please? 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 ); Are you sure this is fixed? I'm using amaroK 1.3.5 in Mandriva cooker, and the encoding is still wrong. 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? Can you please reopen the bug report - the problem is not solved. The enconding still is wrong in KDE 3.5.1 (Kanotix/Debian Sid)/amaroK 1.4 SVN, this is definitely *not* fixed. |