diff -u kdebase-3.5.8/debian/control kdebase-3.5.8/debian/control --- kdebase-3.5.8/debian/control +++ kdebase-3.5.8/debian/control @@ -175,7 +175,7 @@ Package: kdebase-kio-plugins Section: kde Architecture: any -Depends: ${shlibs:Depends}, kdesktop, libsasl2-modules, psmisc, cryptsetup +Depends: ${shlibs:Depends}, kdesktop, libsasl2-modules, psmisc, cryptsetup, man-db (>= 2.5.1-1) Recommends: hal, pmount, kamera, kdemultimedia-kio-plugins Suggests: khelpcenter, mtools Conflicts: kdebase-libs (<< 4:3.0.0) diff -u kdebase-3.5.8/debian/changelog kdebase-3.5.8/debian/changelog --- kdebase-3.5.8/debian/changelog +++ kdebase-3.5.8/debian/changelog @@ -1,3 +1,10 @@ +kdebase (4:3.5.8-2ubuntu17) UNRELEASED; urgency=low + + * kubuntu_9920_kio_man_utf8.diff: Recode manual pages to UTF-8 (LP: + #44548). Requires man-db (>= 2.5.1-1). + + -- Colin Watson Thu, 31 Jan 2008 09:19:09 +0000 + kdebase (4:3.5.8-2ubuntu16) hardy; urgency=low * Move kde-applications-merged/kde-essential.menu to only in patch2: unchanged: --- kdebase-3.5.8.orig/debian/patches/kubuntu_9920_kio_man_utf8.diff +++ kdebase-3.5.8/debian/patches/kubuntu_9920_kio_man_utf8.diff @@ -0,0 +1,64 @@ +diff -Nur -x '*.orig' -x '*~' kdebase-3.5.8/kioslave/man/kio_man.cpp kdebase-3.5.8.new/kioslave/man/kio_man.cpp +--- kdebase-3.5.8/kioslave/man/kio_man.cpp 2007-10-08 10:51:22.000000000 +0100 ++++ kdebase-3.5.8.new/kioslave/man/kio_man.cpp 2008-01-31 09:04:58.000000000 +0000 +@@ -517,6 +517,11 @@ + myStdStream += QString::fromLocal8Bit(s, len); + } + ++void MANProtocol::slotGetStdOutputUtf8(KProcess* /* p */, char *s, int len) ++{ ++ myStdStream += QString::fromUtf8(s, len); ++} ++ + char *MANProtocol::readManPage(const char *_filename) + { + QCString filename = _filename; +@@ -564,24 +569,20 @@ + } + lastdir = filename.left(filename.findRev('/')); + +- QIODevice *fd= KFilterDev::deviceForFile(filename); +- +- if ( !fd || !fd->open(IO_ReadOnly)) +- { +- delete fd; +- return 0; +- } +- QByteArray array(fd->readAll()); +- kdDebug(7107) << "read " << array.size() << endl; +- fd->close(); +- delete fd; +- +- if (array.isEmpty()) +- return 0; +- +- const int len = array.size(); ++ myStdStream = QString::null; ++ KProcess proc; ++ /* TODO: detect availability of 'man --recode' so that this can go ++ * upstream */ ++ proc << "man" << "--recode" << "UTF-8" << filename; ++ ++ QApplication::connect(&proc, SIGNAL(receivedStdout (KProcess *, char *, int)), ++ this, SLOT(slotGetStdOutputUtf8(KProcess *, char *, int))); ++ proc.start(KProcess::Block, KProcess::All); ++ ++ const QCString cstr=myStdStream.utf8(); ++ const int len = cstr.size()-1; + buf = new char[len + 4]; +- qmemmove(buf + 1, array.data(), len); ++ qmemmove(buf + 1, cstr.data(), len); + buf[0]=buf[len]='\n'; // Start and end with a end of line + buf[len+1]=buf[len+2]='\0'; // Two NUL characters at end + } +diff -Nur -x '*.orig' -x '*~' kdebase-3.5.8/kioslave/man/kio_man.h kdebase-3.5.8.new/kioslave/man/kio_man.h +--- kdebase-3.5.8/kioslave/man/kio_man.h 2005-10-10 16:04:01.000000000 +0100 ++++ kdebase-3.5.8.new/kioslave/man/kio_man.h 2008-01-31 12:44:49.000000000 +0000 +@@ -61,6 +61,7 @@ + + private slots: + void slotGetStdOutput(KProcess*, char*, int); ++ void slotGetStdOutputUtf8(KProcess*, char*, int); + + private: + void checkManPaths();