[I18n-sig] Japanese input in Tkinter

Fredrik Hugosson fredrik.hugosson@decuma.se
Wed, 29 May 2002 10:43:26 +0200


I am new to this mailinglist so please excuse me if this has already
been discussed.

I am using Python 2.2.1 on Windows2000 and try to input and show
Japanese and Chinese characters in an Tkinter Entry widget. The widget
is coupled with a Tkinter textvariable. 

The characters shall be used as the facit for handwritten characters and
the facit is also saved to a file, in utf8. When displaying from the
file, everything is working ok.

I set the Windows IME input mode to Japanese, choose hiragana and try to
write hiragana characters (using romanji input) in the Entry box. All I
get in the textvariable are questionmarks (?).

Fonts seem to be installed correctly since characters are displayed
correctly when programatically displayed in the entry box (by setting
the textvariable to the characters unicode value).

Currently I have to work around this problem by using an alternative
input, writing the unicode for each character instead of the character
itself. It works but it is really cumbersome.

Does anyone have a solution or similar experiences?

/Fredrik H