claudio
29th December 2007, 20:59
The file I try to load is UTF8 encoded - I'm doing this with:
QTextStream in(&file);
QString fs = in.readAll();
How can I convert this string into an other encoding? I tried something like this, but don't get it work:
QTextCodec *codec = QTextCodec::codecForName("ISO 8859-1");
QByteArray ba = codec->fromUnicode(fs);
QString vcflatin1 = ba;
...
The application I want to build is a conversion tool wich reads several VCF (address) files to a CSV file.
Thanks for any help!
Claudio
QTextStream in(&file);
QString fs = in.readAll();
How can I convert this string into an other encoding? I tried something like this, but don't get it work:
QTextCodec *codec = QTextCodec::codecForName("ISO 8859-1");
QByteArray ba = codec->fromUnicode(fs);
QString vcflatin1 = ba;
...
The application I want to build is a conversion tool wich reads several VCF (address) files to a CSV file.
Thanks for any help!
Claudio