Tkinter Entry to accept Unicode text?

Viewed 974

I have a Tkinter Entry widget and a Hungarian keyboard. When I press the ő button on the keyboard, the Entry widget displays õ. ű becomes û. (I haven't had this problem in other applications since Windows 3.1.)

Edit:

I do have two language settings on this computer and when I start changing them around, the problem disappears.

screenshot

What can I do to make Tkinter handle my input correctly?

3 Answers

It looks like it is a problem with changes to the keyboard layout, as Tk (the library under Tkinter) on Windows doesn't do anything with the lParam in the the WM_INPUTLANGCHANGE messages. That's a bug.

There is a Tk ticket here: Tk Ticket

Unfortunately, the issue might be TkInter only.

Would it be possible to get more details and make a test using plain Tcl/Tk ? So, download a current tcl/tk starkit or distribution and try the script:

pack [entry .e]

and look, if the problem is present there too ?

Please report to the tk ticket, anonymous login might be required there.

Can't reproduce your problem. Works for me with Tk and tkinter as well. See the Tk ticket.

Related