PDA

View Full Version : QTextEdit and Chinese characters on a Mac



jupi32000
17th February 2010, 02:02
Hi,

I created a simple application to test my Chinese characters problem:


#include <QtGui>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget window;

QTextEdit *button = new QTextEdit(&window);
button->show();
window.show();
return app.exec();
}

When I enter any English character it is displayed correctly in the edit box, however when I use the Character Palette to enter chinese (or Japanese) characters, it always displays aa. If I copy and paste the same characters, the characters are displayed properly.
I searched the forum and the only similar problem I found was on a windows platform and was resolved my modifying the default encoding for non unicode.
I would appreciate any advice you could offer.