diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-17 02:09:05 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-02 19:05:13 +0200 |
commit | c319ffd92918f43a2bf21a531b7d523bdc064cf4 (patch) | |
tree | cb35c2ea9ee1d7d5727b31ca8f5d848463478edd | |
parent | 3c199843f5b649d705e3c6e6a2ea288ce536470f (diff) | |
download | tdelibs-c319ffd92918f43a2bf21a531b7d523bdc064cf4.tar.gz tdelibs-c319ffd92918f43a2bf21a531b7d523bdc064cf4.zip |
Fix utf8 encoding for webdav directories
Thanks to Thorsten Glaser for the patch!
(cherry picked from commit e607cfe6113c9cf3d4b64814985d25e5ee711a8c)
-rw-r--r-- | kioslave/http/http.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index 483293025..30ee723b1 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 ); |