Converting to execution character set: Illegal byte sequence Erorr ?!!!



  • hi
    @
    #include <QtGui>

    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);

    QPushButton btn;
    btn.setText( QString::fromWCharArray(L"سلام") );
    btn.show();
    
    return app.exec();
    

    }
    @

    what is wrong in this code ?!! that take "converting to execution character set: Illegal byte sequence" erorr.
    qt 4.8.1 : qt creator 2.4.1 : MinGW-gcc440_1 compiler

    i write this code with msvc compiler and compile successfuly but with mingw ... !!



  • What you need is told MinGW which encoding your source file used if is not UTF-8.


    In addition, MinGW-gcc4.4 seems have a bug, maybe -finput-charset=charset will refuse to work. You can try to update your MinGW to 4.6 +



  • i cant understand your means. i use UTF-8 method but take the same erorr!



  • i update my mingw but take the same error ! please help me


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.