I'm using Qt 5.3.0. I need to add some Japanese characters into my code. I already add BOM
but I still have to use QString::fromLocal8Bit
to make characters to correctly be displayed.
For example:
I have a pushButton and I call ui->pushButton->setText("浦");
then the button will have with weird marks instead of the character 浦
.
I have to use ui->pushButton->setText(QString::fromLocal8Bit("浦"));
to make it display right.
Is there a way to avoid the call of fromLocal8Bit
by setting all creation of QString to pass the function fromLocal8Bit by default? without changing Qt source code.
Or any other good ideas?