[Development] Charset probleme

Thomas PABST thomas.pabst at gmail.com
Mon Apr 29 13:49:54 CEST 2013


Hi,

Usually, for charsset problems we can use theses functions:
 Qt Code:


QTextCodec <http://qt-project.org/doc/qt-4.8/qtextcodec.html>::setCodecForTr
(QTextCodec <http://qt-project.org/doc/qt-4.8/qtextcodec.html>::codecForName
("UTF-8"));
QTextCodec <http://qt-project.org/doc/qt-4.8/qtextcodec.html>::
setCodecForLocale(QTextCodec<http://qt-project.org/doc/qt-4.8/qtextcodec.html>
::codecForName("UTF-8"));
QTextCodec <http://qt-project.org/doc/qt-4.8/qtextcodec.html>::
setCodecForCStrings(QTextCodec<http://qt-project.org/doc/qt-4.8/qtextcodec.html>
::codecForName("UTF-8"));


 However, In my case for a porting Qt3 to Qt4 I have a global constant.
 Qt Code:


const QString <http://qt-project.org/doc/qt-4.8/qstring.html> myVar = "text
with accent é à è"


 In this case the string is interpreted by gcc. Is there any QT DEFINE to
force use of UTF-8 ?

Thanks
-----------------------------------------------------
Thomas PABST
thomas.pabst at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130429/f6b706e2/attachment.html>


More information about the Development mailing list