How to get proper international font in Text widget?

ok1fou at ok1fou at
Wed Sep 13 12:38:53 CEST 2000


I have the following same problem in Tkinter and Perl/Tk.

When running a Tk application in Windows, I can never make widgets like
Text use the correct font encoding (in this case Win-1250).

The question is how to set up the font and how to insert text so that
the result looks correct in Central/East European languages (e.g. Czech)


    from Tkinter import *
    c = Tk()
    # the following displays correctly
    c.title( 'Some text using Czech national characters')
    t = Text(c, text="Some other text using Czech spelling")
    t.pack()      # displays Czech characters as garbage
    t.config( font='{Arial CE}' )  # this font is supposed to be CP1250
    # the text is still garbage despite the i18n-ized font
    t.insert( END, "Some other Czech text") # still garbage

Would anyone know where to look for solution???

Sent via
Before you buy.

More information about the Python-list mailing list