summaryrefslogtreecommitdiff
path: root/packages/qte/qte-2.3.12/encoding.patch
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2006-04-21 10:30:08 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-21 10:30:08 +0000
commit28f02967abbf61c832bd5713ee7c055e2c73eb19 (patch)
treefab6a9dab642c1e0ea3f78a5d0394c34a60397d2 /packages/qte/qte-2.3.12/encoding.patch
parent2ae892dc300673b51fb9eb2515a3b0e4f14ae587 (diff)
added qt/e 2.3.12 as non-default, WIP
Diffstat (limited to 'packages/qte/qte-2.3.12/encoding.patch')
-rw-r--r--packages/qte/qte-2.3.12/encoding.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/qte/qte-2.3.12/encoding.patch b/packages/qte/qte-2.3.12/encoding.patch
new file mode 100644
index 0000000000..77626c48bf
--- /dev/null
+++ b/packages/qte/qte-2.3.12/encoding.patch
@@ -0,0 +1,36 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: qt-2.3.10-snapshot-20060120/src/tools/qstring.cpp
+===================================================================
+--- qt-2.3.10-snapshot-20060120.orig/src/tools/qstring.cpp 2006-01-20 01:08:03.000000000 +0100
++++ qt-2.3.10-snapshot-20060120/src/tools/qstring.cpp 2006-01-20 20:49:57.610143784 +0100
+@@ -14468,7 +14468,11 @@
+ return qt_winQString2MB( *this );
+ #endif
+ #ifdef _WS_QWS_
+- return utf8(); // ##### if there is ANY 8 bit format supported?
++ QTextCodec* codec = QTextCodec::codecForLocale();
++ return codec
++ ? codec->fromUnicode(*this)
++ : utf8();
++ //return latin1(); // ##### if there is ANY 8 bit format supported?
+ #endif
+ #endif
+ }
+@@ -14514,7 +14518,12 @@
+ return qt_winMB2QString( local8Bit );
+ #endif
+ #ifdef _WS_QWS_
+- return fromUtf8(local8Bit,len);
++ QTextCodec* codec = QTextCodec::codecForLocale();
++ if( len < 0) len = qstrlen(local8Bit);
++ return codec
++ ? codec->toUnicode(local8Bit, len)
++ : QString::fromUtf8(local8Bit,len);
++// return fromLatin1(local8Bit,len);
+ #endif
+ #endif // QT_NO_TEXTCODEC
+ }