I encode a string using Blowfish algorithm and it saves the encoded string as an unsigned char *,and now I have to convert it to QString, i tried the following and it works fine:
//encodedPass is unsigned char *
QString tmp=QString::fromLocal8Bit((char*)encodedPass);
qDebug()<<tmp;
and tmp is exactly what encodedPass is,but the problem is that when I want to show tmp using QMessageBox or put it in a QLineEdit it changes to another string!
forexample:
tmp is " ╖îf§' " and when I try to put it in a textbox using
edt_userName->setText(tmp);
" ·Œfªá' " will appear in textbox! why is that?
Bookmarks