[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kdoctools
From:       Cornelius Schumacher <schumacher () kde ! org>
Date:       2004-07-08 8:02:32
Message-ID: 20040708080232.8DEDB16B31 () office ! kde ! org
[Download RAW message or body]

CVS commit by cschumac: 

Fix display of GNOME manuals.


  M +27 -12    kio_help.cpp   1.56


--- kdelibs/kdoctools/kio_help.cpp  #1.55:1.56
@@ -196,4 +196,11 @@ void HelpProtocol::get( const KURL& url 
 
     QString file = target.path();
+    
+    if ( mGhelp ) {
+      if ( file.right( 4 ) != ".xml" ) {
+         get_file( target );
+         return;
+      }
+    } else {
     QString docbook_file = file.left(file.findRev('/')) + "/index.docbook";
     if (!KStandardDirs::exists(file)) {
@@ -211,4 +218,5 @@ void HelpProtocol::get( const KURL& url 
         }
     }
+    }
 
     infoMessage(i18n("Preparing document"));
@@ -223,5 +231,12 @@ void HelpProtocol::get( const KURL& url 
             unicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) );
         } else {
-            data( fromUnicode( mParsed ) );
+            int pos1 = mParsed.find( "charset=" );
+            if ( pos1 > 0 ) {
+              int pos2 = mParsed.find( '"', pos1 );
+              if ( pos2 > 0 ) {
+                mParsed.replace( pos1, pos2 - pos1, "charset=UTF-8" );
+              }
+            }
+            data( mParsed.utf8() );
         }
     } else {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic