summaryrefslogtreecommitdiffstats
path: root/redhat/kdelibs/kdelibs-3.5.13-fix_UTF8_encoding_for_WebDAV_directories.patch
blob: 6fa9a085a4ee6b671780227bc1612f497f32a632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 1f37c9cdb9bb47f8453cf26af8006c7c8d4ca3b3 Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <t.glaser@tarent.de>
Date: Tue, 27 Dec 2011 14:28:27 +0100
Subject: [PATCH] fix UTF-8 encoding for WebDAV directories

idea derived from KIO slave http.cpp from KDE 4; reimplemented
on top of Qt3/KDE3 APIs

Bug: http://bugs.kde.org/show_bug.cgi?id=127251

Signed-off-by: Thorsten Glaser <t.glaser@tarent.de>
---
 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 a1495d7..16b785d 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 );
 
-- 
1.7.2.3