LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kdelibs-tarent-fix-webdav-utf8.diff of Package kdelibs3 (Project KDE:KDE3)

Description: fix UTF-8 encoding for WebDAV directories
Bug: http://bugs.kde.org/show_bug.cgi?id=127251
Author: Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
Origin: KIO slave http.cpp from KDE 4

--- kdelibs-3.5.10/kioslave/http/http.cc~	2008-02-13 10:41:06.000000000 +0100
+++ kdelibs-3.5.10/kioslave/http/http.cc	2011-12-27 13:27:17.000000000 +0100
@@ -45,6 +45,7 @@
 #include <qregexp.h>
 #include <qdatetime.h>
 #include <qstringlist.h>
+#include <qurl.h>
 
 #include <kurl.h>
 #include <kidna.h>
@@ -750,9 +751,14 @@ void HTTPProtocol::davStatList( const KU
       entry.clear();
 
       QString urlStr = href.text();
+#if 0
       int encoding = remoteEncoding()->encodingMib();
       if ((encoding == 106) && (!KStringHandler::isUtf8(KURL::decode_string(urlStr, 4).latin1())))
         encoding = 4; // Use latin1 if the file is not actually utf-8
+#else
+      QUrl::decode(urlStr);
+      int encoding = 106;
+#endif
 
       KURL thisURL ( urlStr, encoding );