Unicode Text Entry


#1

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…
http://msdn.microsoft.com/en-us/library/dd319104(v=VS.85).aspx

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!)
http://msdn.microsoft.com/en-us/goglobal/bb688135.aspx


#2

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

#3

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


#4

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


#5

well, showing a picture is not trouble,so
[attachment=0]sf.PNG[/attachment]


#6

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.

Tnx