Tkinter and utf-8

Justin Ezequiel jezequiel at
Fri Oct 29 05:09:34 CEST 2004

What font is Tkinter using for displaying utf-8 characters?

On my Windows XP, most of the characters with names (
are displayed WYSIWYG.
However, on my Mandrake (warning: Linux newbie), most characters are
displayed as \u???? where ???? is the Hex code.

## start of script
import Tkinter
import ScrolledText
import codecs
import tkFont

##FONT = 'Courier'

class MyFrame(Tkinter.Frame):
  def __init__(self, master=None):
      self.root = master
      Tkinter.Frame.__init__(self, master)
      self.pack(fill=Tkinter.BOTH, expand=1)
##        self.textBox = ScrolledText.ScrolledText(self, font=(FONT, 12))
      self.textBox = ScrolledText.ScrolledText(self,
      self.textBox.pack(fill=Tkinter.BOTH, expand=1)

  def write(self, txt):
      self.textBox.insert(Tkinter.END, txt)

if __name__ == '__main__':
  root = Tkinter.Tk()

  frame = MyFrame(root)

  f ='named.txt', 'r', 'utf-8')

  root.minsize(640, 480)
## end of script ----------

Python 2.3.3 (#2, Feb 17 2004, 11:45:40)
[GCC 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)] on linux2


Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
MS Windows XP SP2

Please CC me directly as I am not subscribed

BTW, tried to e-mail directly (with 2 jpeg screenshots and the named.txt file) 
but got the following:

This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

    python-list at

Technical details of failure:
PERM_FAILURE: SMTP Error (state 13): 553 rejected, message looks like spam.

More information about the Python-list mailing list