Sölve
7th June 2011, 13:00
Hello.
During program writing I met problem with QTextCodec.
I want to decode text from Shift-JIS.
I've got two computers, at first I've got linux and Win 7 x64, at second Win XP.
On linux and Win 7 with installed Qt4 (4.7.0) decoding is successful, but on Win XP (Qt4 is not installed) not.
When I creating QTextCodec 0 is returned and I can't decode text.
On XP I've got installed east-asian languages support.
How can I get QTextCodec working?
Thanks in advance.
Some piece of my code:
QTextCodec *codec = QTextCodec::codecForName("Shift-JIS");
if(codec == 0)
{
qDebug() << tr("There're no Shift-JIS codec");
return;
}
QByteArray tTemp;
// There're writing to tTemp in loop
QString temp = codec->toUnicode(tTemp);
During program writing I met problem with QTextCodec.
I want to decode text from Shift-JIS.
I've got two computers, at first I've got linux and Win 7 x64, at second Win XP.
On linux and Win 7 with installed Qt4 (4.7.0) decoding is successful, but on Win XP (Qt4 is not installed) not.
When I creating QTextCodec 0 is returned and I can't decode text.
On XP I've got installed east-asian languages support.
How can I get QTextCodec working?
Thanks in advance.
Some piece of my code:
QTextCodec *codec = QTextCodec::codecForName("Shift-JIS");
if(codec == 0)
{
qDebug() << tr("There're no Shift-JIS codec");
return;
}
QByteArray tTemp;
// There're writing to tTemp in loop
QString temp = codec->toUnicode(tTemp);