Unicode Text Entry


Jules did such an amazing job with unicode TextInput on the Mac(and I assume iPhone), that I held my breath and compiled my app on PC to see if it could handle Japanese IME. The entry box comes up but when I hit return the text is ignored…(as is text copy/pasted)

I’m willing to take a stab at contributing something, but the PC isn’t really my fortay… any guru’s on here want to offer some pearl’s of wisdom?

I’m thinking adding…

WM_IME_COMPOSITION to the windowProc would be a good start…


This looks promising as well…

and this(sorry, trying to keep my links handy…I always feel like i’ve stumbled on gold when i find an applicable link on msdn!)


may be it is just a font thing…
I modify the demo a littlt and it can display Chinese characters in the edit control.

static Component* createMiscPage()
    DemoPageComp* page = new DemoPageComp();

    TextEditor* textEditor1 = new TextEditor();
    page->addAndMakeVisible (textEditor1);
    textEditor1->setBounds (10, 25, 200, 24);
    Font myfont;//my code
    myfont.setTypefaceName(L"微软雅黑");//my code
    myfont.setItalic(true);//my code
    textEditor1->setFont(myfont);//my code
    textEditor1->setText (L"这里支持汉字吗?single-line text box");//modified code


Thanks David; but my issue is… can you enter chinese text?


of course I could,
sorry for I didn’t show you with a screen shot, but I just can enter the Chinese characters.
believe me


well, showing a picture is not trouble,so


Interesting, I wonder why Japanese IME is not working for me…

Looking at the source i’m not too surprised by it not working on XP, but i’m very surprised it is for you. I’ll try swapping to chinese and see if that makes a difference.