]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/qte/qte-2.3.10/encoding.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / qte / qte-2.3.10 / encoding.patch
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  }