Tkinter - non-ASCII characters in text widgets problem

Scott David Daniels Scott.Daniels at Acm.Org
Fri Jun 26 00:32:28 EDT 2009


norseman wrote:
> ...  A note here:  In reading the original posting I get symbols that are not
> familiar to me as alphabet.
>  From the line in your original:
>      Label(root, text='ęóąśłżźćń').pack()
> I see text='
>            then an e with a goatee
>                 a  capitol O with an accent symbol on top (')
>                 an a with a tail on the right
>                 a  s with an accent on top
>                 an I do no not know what - maybe some sort of l with a
>                                            slash through the middle
>                 a  couple of z with accents on top
>                 a  capitol C with an accent on top
>                 a  n with a short bar on top

Here's something to try in any future circumstances:

Python 3.1rc2 (r31rc2:73414, Jun 13 2009, 16:43:15) [MSC v.1500 32 bit 
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
 >>> import unicodedata as ud
 >>> for ch in 'ęóąśłżźćń':
     print('%3d %4x %c %s' % (ord(ch), ord(ch), ch, ud.name(ch)))


281  119 ę LATIN SMALL LETTER E WITH OGONEK
243   f3 ó LATIN SMALL LETTER O WITH ACUTE
261  105 ą LATIN SMALL LETTER A WITH OGONEK
347  15b ś LATIN SMALL LETTER S WITH ACUTE
322  142 ł LATIN SMALL LETTER L WITH STROKE
380  17c ż LATIN SMALL LETTER Z WITH DOT ABOVE
378  17a ź LATIN SMALL LETTER Z WITH ACUTE
263  107 ć LATIN SMALL LETTER C WITH ACUTE
324  144 ń LATIN SMALL LETTER N WITH ACUTE

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list