summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tdelibs.old/kremoteencoding-utf8.diff
blob: 74600a0f4bf92b05cb92727899ce66b209e9f9a0 (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
Index: kio/kio/kremoteencoding.cpp
===================================================================
--- kio/kio/kremoteencoding.cpp.orig
+++ kio/kio/kremoteencoding.cpp
@@ -53,7 +53,7 @@ QCString KRemoteEncoding::encode(const Q
   QCString result = codec->fromUnicode(name);
   if (codec->toUnicode(result) != name)
     return name.latin1();
- 
+
   return result;
 }
 
@@ -80,11 +80,13 @@ void KRemoteEncoding::setEncoding(const
 
   if (name)
     codec = QTextCodec::codecForName(name);
+  else
+    codec = QTextCodec::codecForMib( 106 ); // fallback to UTF-8
 
   if (codec == 0L)
     codec = QTextCodec::codecForMib(1);
 
-  kdDebug() << k_funcinfo << "setting encoding " << codec->name() 
+  kdDebug() << k_funcinfo << "setting encoding " << codec->name()
 	    << " for name=" << name << endl;
 }