summaryrefslogtreecommitdiff
path: root/qt/qt-2.3.10.patch/encoding.patch
authormickeyl <mickeyl>2005-02-19 16:07:58 (UTC)
committer mickeyl <mickeyl>2005-02-19 16:07:58 (UTC)
commitb7bf9c7acdc010eb30bc246372efb0d1b394166a (patch) (unidiff)
tree8dde116603cd8ddf439a881fc4a1d8f413af617b /qt/qt-2.3.10.patch/encoding.patch
parent298d0d244ca724405ca0651775ed61a22ce7a5ae (diff)
downloadopie-b7bf9c7acdc010eb30bc246372efb0d1b394166a.zip
opie-b7bf9c7acdc010eb30bc246372efb0d1b394166a.tar.gz
opie-b7bf9c7acdc010eb30bc246372efb0d1b394166a.tar.bz2
hello qte2.3.10 patches
bye bye old patches
Diffstat (limited to 'qt/qt-2.3.10.patch/encoding.patch') (more/less context) (show whitespace changes)
-rw-r--r--qt/qt-2.3.10.patch/encoding.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/qt/qt-2.3.10.patch/encoding.patch b/qt/qt-2.3.10.patch/encoding.patch
new file mode 100644
index 0000000..13a4828
--- a/dev/null
+++ b/qt/qt-2.3.10.patch/encoding.patch
@@ -0,0 +1,34 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- qt-2.3.9-snapshot-20041211/src/tools/qstring.cpp~encoding
7+++ qt-2.3.9-snapshot-20041211/src/tools/qstring.cpp
8@@ -14469,7 +14469,11 @@
9 return qt_winQString2MB( *this );
10 #endif
11 #ifdef _WS_QWS_
12- return utf8(); // ##### if there is ANY 8 bit format supported?
13+ QTextCodec* codec = QTextCodec::codecForLocale();
14+ return codec
15 + ? codec->fromUnicode(*this)
16 + : utf8();
17+ //return latin1(); // ##### if there is ANY 8 bit format supported?
18 #endif
19 #endif
20 }
21@@ -14515,7 +14519,12 @@
22 return qt_winMB2QString( local8Bit );
23 #endif
24 #ifdef _WS_QWS_
25- return fromUtf8(local8Bit,len);
26+ QTextCodec* codec = QTextCodec::codecForLocale();
27+ if( len < 0) len = qstrlen(local8Bit);
28+ return codec
29 + ? codec->toUnicode(local8Bit, len)
30 + : QString::fromUtf8(local8Bit,len);
31+// return fromLatin1(local8Bit,len);
32 #endif
33 #endif // QT_NO_TEXTCODEC
34 }