summaryrefslogtreecommitdiff
path: root/qt
authorzecke <zecke>2004-07-23 12:37:05 (UTC)
committer zecke <zecke>2004-07-23 12:37:05 (UTC)
commit641881607b1720e2cf013b54b0e5c2c03fcf55b9 (patch) (unidiff)
tree4c956c41bf999314fdc97fed1bd20b78d6d8b6d0 /qt
parentba1d7a806d3cdc6b8b1a415c84dc7031e0f8e4b5 (diff)
downloadopie-641881607b1720e2cf013b54b0e5c2c03fcf55b9.zip
opie-641881607b1720e2cf013b54b0e5c2c03fcf55b9.tar.gz
opie-641881607b1720e2cf013b54b0e5c2c03fcf55b9.tar.bz2
Add the encoding Qt patch
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qt-2.3.7.patch/qte237-encoding.patch49
-rw-r--r--qt/qt-2.3.8.patch/qte238-encoding.patch49
2 files changed, 98 insertions, 0 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-encoding.patch b/qt/qt-2.3.7.patch/qte237-encoding.patch
new file mode 100644
index 0000000..c2f5c08
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-encoding.patch
@@ -0,0 +1,49 @@
1German umlaute quite likely french, italian, spanish did
2not work due QFile::[decode,encode]Name did call QString
3local8Bit,fromLocal8Bit which plainly tried to use utf8
4encoding even if not useful. So a filename got changed
5and QFileInfo recognized the file not beeing present anymore...
6which lead to files not be shown.
7Also with Year-Names problem exists as the base system sent
8it encoded upstream.
9
10If you want to have UTF-8 encoding use LC_CTYPE as always and
11QTextCodec::codecForLocale will use the right UTF-8 encoding.
12
13As fallback the old behaviour was preserved
14
15
16
17
18
19
20
21 --- qt-2.3.7-old/src/tools/qstring.cpp2004-07-23 14:33:02.000000000 +0200
22 +++ qt-2.3.7/src/tools/qstring.cpp2004-07-23 14:32:31.000000000 +0200
23@@ -14469,7 +14469,11 @@
24 return qt_winQString2MB( *this );
25 #endif
26 #ifdef _WS_QWS_
27- return utf8(); // ##### if there is ANY 8 bit format supported?
28+ QTextCodec* codec = QTextCodec::codecForLocale();
29+ return codec
30 + ? codec->fromUnicode(*this)
31 + : utf8();
32+ //return latin1(); // ##### if there is ANY 8 bit format supported?
33 #endif
34 #endif
35 }
36@@ -14515,7 +14519,12 @@
37 return qt_winMB2QString( local8Bit );
38 #endif
39 #ifdef _WS_QWS_
40- return fromUtf8(local8Bit,len);
41+ QTextCodec* codec = QTextCodec::codecForLocale();
42+ if( len < 0) len = qstrlen(local8Bit);
43+ return codec
44 + ? codec->toUnicode(local8Bit, len)
45 + : QString::fromUtf8(local8Bit,len);
46+// return fromLatin1(local8Bit,len);
47 #endif
48 #endif // QT_NO_TEXTCODEC
49 }
diff --git a/qt/qt-2.3.8.patch/qte238-encoding.patch b/qt/qt-2.3.8.patch/qte238-encoding.patch
new file mode 100644
index 0000000..5ddb43c
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-encoding.patch
@@ -0,0 +1,49 @@
1German umlaute quite likely french, italian, spanish did
2not work due QFile::[decode,encode]Name did call QString
3local8Bit,fromLocal8Bit which plainly tried to use utf8
4encoding even if not useful. So a filename got changed
5and QFileInfo recognized the file not beeing present anymore...
6which lead to files not be shown.
7Also with Year-Names problem exists as the base system sent
8it encoded upstream.
9
10If you want to have UTF-8 encoding use LC_CTYPE as always and
11QTextCodec::codecForLocale will use the right UTF-8 encoding.
12
13As fallback the old behaviour was preserved
14
15
16
17
18
19
20
21 --- qt-2.3.8-old/src/tools/qstring.cpp2004-07-23 14:33:02.000000000 +0200
22 +++ qt-2.3.8/src/tools/qstring.cpp2004-07-23 14:32:31.000000000 +0200
23@@ -14469,7 +14469,11 @@
24 return qt_winQString2MB( *this );
25 #endif
26 #ifdef _WS_QWS_
27- return utf8(); // ##### if there is ANY 8 bit format supported?
28+ QTextCodec* codec = QTextCodec::codecForLocale();
29+ return codec
30 + ? codec->fromUnicode(*this)
31 + : utf8();
32+ //return latin1(); // ##### if there is ANY 8 bit format supported?
33 #endif
34 #endif
35 }
36@@ -14515,7 +14519,12 @@
37 return qt_winMB2QString( local8Bit );
38 #endif
39 #ifdef _WS_QWS_
40- return fromUtf8(local8Bit,len);
41+ QTextCodec* codec = QTextCodec::codecForLocale();
42+ if( len < 0) len = qstrlen(local8Bit);
43+ return codec
44 + ? codec->toUnicode(local8Bit, len)
45 + : QString::fromUtf8(local8Bit,len);
46+// return fromLatin1(local8Bit,len);
47 #endif
48 #endif // QT_NO_TEXTCODEC
49 }