Tkinter - non-ASCII characters in text widgets problem

MRAB python at mrabarnett.plus.com
Thu Jun 25 23:50:31 CEST 2009


Sebastian Pająk wrote:
> 2009/6/25 "Martin v. Löwis" <martin at v.loewis.de>:
>>> I've tried various UTF file encoding (also with BOM mark), use of
>>> u"text"
>> Always use u"text". This should work. Everything else might not work.
> 
> But I tried this here without success
> 
>>> After applying this, the effect remains the same - one big garbage.
>> Can you please be more specific? What is "one big garbage"?
>>
> 
> There is a square (or some other weird sign) 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'm out of ideas: my script is UTF-8 in 101%; Mac and Windows both
>>> support UTF-8, Python also supports it - so where is the problem?
>> Most likely, Tk does not work correctly on your system. See whether
>> you can get correct results with wish.
>>
> 
> There is no wish. I'm talking about build-in Tkinter (isn't Tk
> build-in Python?).
> 
> btw. I'm workin on Windows, my friend on Mac - he points me the
> problem he has with my script. He is not a computer geek nor a
> programmer - he even doesn't know what wish/Tk or Python is
> 
> 
> Does different endianness can have something to do here?

In summary:

You're providing the same text for a Button and a Label. On Mac OSX the
Button shows the text correctly, but the Label doesn't.

Is this correct?



More information about the Python-list mailing list