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:
%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 {