thomas1818
29th April 2013, 10:09
Hi,
Usually, for charsset problems we can use theses functions:
QTextCodec::setCodecForTr(QTextCodec::codecForName ("UTF-8"));
QTextCodec::setCodecForLocale(QTextCodec::codecFor Name("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecF orName("UTF-8"));
However, In my case for a porting Qt3 to Qt4 I have a global constant.
const QString 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
Usually, for charsset problems we can use theses functions:
QTextCodec::setCodecForTr(QTextCodec::codecForName ("UTF-8"));
QTextCodec::setCodecForLocale(QTextCodec::codecFor Name("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecF orName("UTF-8"));
However, In my case for a porting Qt3 to Qt4 I have a global constant.
const QString 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