-rw-r--r-- | qt/qt-2.3.7.patch/qte237-encoding.patch | 49 | ||||
-rw-r--r-- | qt/qt-2.3.8.patch/qte238-encoding.patch | 49 |
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 @@ +German umlaute quite likely french, italian, spanish did +not work due QFile::[decode,encode]Name did call QString +local8Bit,fromLocal8Bit which plainly tried to use utf8 +encoding even if not useful. So a filename got changed +and QFileInfo recognized the file not beeing present anymore... +which lead to files not be shown. +Also with Year-Names problem exists as the base system sent +it encoded upstream. + +If you want to have UTF-8 encoding use LC_CTYPE as always and +QTextCodec::codecForLocale will use the right UTF-8 encoding. + +As fallback the old behaviour was preserved + + + + + + + +--- qt-2.3.7-old/src/tools/qstring.cpp 2004-07-23 14:33:02.000000000 +0200 ++++ qt-2.3.7/src/tools/qstring.cpp 2004-07-23 14:32:31.000000000 +0200 +@@ -14469,7 +14469,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 + } +@@ -14515,7 +14519,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 + } 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 @@ +German umlaute quite likely french, italian, spanish did +not work due QFile::[decode,encode]Name did call QString +local8Bit,fromLocal8Bit which plainly tried to use utf8 +encoding even if not useful. So a filename got changed +and QFileInfo recognized the file not beeing present anymore... +which lead to files not be shown. +Also with Year-Names problem exists as the base system sent +it encoded upstream. + +If you want to have UTF-8 encoding use LC_CTYPE as always and +QTextCodec::codecForLocale will use the right UTF-8 encoding. + +As fallback the old behaviour was preserved + + + + + + + +--- qt-2.3.8-old/src/tools/qstring.cpp 2004-07-23 14:33:02.000000000 +0200 ++++ qt-2.3.8/src/tools/qstring.cpp 2004-07-23 14:32:31.000000000 +0200 +@@ -14469,7 +14469,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 + } +@@ -14515,7 +14519,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 + } |