summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-17 02:09:05 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-17 02:09:05 -0600
commite607cfe6113c9cf3d4b64814985d25e5ee711a8c (patch)
tree79ad0e72c2c10248cd71e0c7773c90bfce8a5684
parente6b6f2eafdf6dbe3b4d5526c75e9d7c5aaee5ccb (diff)
downloadtdelibs-e607cfe6113c9cf3d4b64814985d25e5ee711a8c.tar.gz
tdelibs-e607cfe6113c9cf3d4b64814985d25e5ee711a8c.zip
Fix utf8 encoding for webdav directories
Thanks to Thorsten Glaser for the patch!
-rw-r--r--kioslave/http/http.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index a1495d78b..16b785d03 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -45,6 +45,7 @@
#include <tqregexp.h>
#include <tqdatetime.h>
#include <tqstringlist.h>
+#include <tqurl.h>
#include <kurl.h>
#include <kidna.h>
@@ -750,9 +751,14 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
entry.clear();
TQString 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
+ TQUrl::decode(urlStr);
+ int encoding = 106;
+#endif
KURL thisURL ( urlStr, encoding );