[pygtk] Unicode input in a PyGTK app running in Windows

Dieter Verfaillie dieterv at optionexplicit.be
Fri Oct 7 03:37:07 WST 2011

On 06/10/2011 15:53, Haris Andrianakis wrote:
> I have a PyGTK application that runs fine on both Linux and Windows. In
> Linux I can input unicode characters by hexcode in GtkEntries by using
> the combination Ctrl-Shift-U hexcode and pressing Enter. The same thing
> doesn't work in Windows.
> Do you know if there is any way to activate/enable this functionality in
> windows?

That's a general GTK+ question really, but here we go:

First, you'll need to make sure gtk-show-input-method-menu
is set to 1 in etc\gtk-2.0\gtkrc

Additionally, you might be interested in setting
gtk-show-unicode-menu to 1 if you have a need for
unicode control characters.

If you're using the All-in-one installer, you can find
that file in your Python installation as:

If not, then you should already know where GTK+ lives :)

With these settings, you can right-click a gtk.Entry()
go into the "Input Methods" menu and make sure "System (Simple)"
is selected. That should do the trick.


More information about the pygtk mailing list