Tkinter - non-ASCII characters in text widgets problem

Sebastian Pająk spconv+m at gmail.com
Fri Jun 26 14:37:41 CEST 2009


>  in place where polish
>> accented character should be (like "ęłąśł" etc)
>> This problem is only on mac os x and it doesn't apply to button widget
>> (where characters are correct)
>
> I see. So it is a font problem: if the square box is displayed, it means
> that the font just doesn't have a glyph for the character you want to
> display. Try using a different font in the label widget.

I've tried many fonts, the effect is always the same. Standard fonts
like Arial, Tahoma, Vedana all have Polish glyphs. The problem is that
Tkinter selects wrong glyphs for non-ASCII chars. It's not the font
issue as text on Button widget appears correctly

>> There is no wish. I'm talking about build-in Tkinter
>
> So try installing Tk separately.
>
>> (isn't Tk build-in Python?).
>
> Depends on where exactly you got your Python from, and what exactly
> is your OSX version. Recent releases of OSX include a copy of Tcl/Tk,
> and some sets of Python binaries link against the Apple Tk.
>

As I said I don't have mac osx. I just expect my Python script to be
portable and behave the same on both Windows and OSX, but It isn't.



More information about the Python-list mailing list