iso_8859_1 mystery/tkinter

vincent wehren vincent at visualtrans.de
Wed May 18 15:15:46 EDT 2005


""Martin v. Löwis"" <martin at v.loewis.de> schrieb im Newsbeitrag 
news:mailman.158.1116437716.8733.python-list at python.org...
| phil wrote:
| > These work fine on Linux
| >         s.const = {}
| >         s.const['DEG'] = '%c' % (0xb0)
| >         s.const['DIV'] = '%c' % (0xf7)
| >         s.const['ANG'] = '%c' % (0xd8)
| >
| > On WinXP the symbols for division and angle work fine.
| > But the symbol for degrees, a little circle, produces
| > a vertical bar in Tkinter Text box or Canvas.
|
| I don't understand what you mean by that. Do you have
| the symbol for degrees in your source code (so that
| the editor for the source code displays it as a little
| circle)? Or do you use the numeric code?
|
| Can you show a small program that demonstrates this
| effect?

OP probably means something like:

import Tkinter
root = Tkinter.Tk()
t = Tkinter.Text()
t.pack()
t.insert(0.0, '%c' % 0xb0)
root.mainloop()

which shows a vertical bar in the Text widget.

Changing:

t.insert(0.0, '%c' % 0xb0)

to

t.insert(0.0, u'%c' % 0xb0)


should do the trick though.

--

Regards,

Vincent Wehren

|
| Regards,
| Martin
| 





More information about the Python-list mailing list