Author terry.reedy
Recipients culler, serhiy.storchaka, terry.reedy
Date 2017-05-13.06:02:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Test needed.

import Tkinter as tk
import tkFont as tkf

root = tk.Tk()
font = tkf.Font(root, size=20, family=u"MS \u30b4\u30b7\u30c3\u30af")

reproduces the failure in Marc's example.

  File "C:\Programs\Python27\lib\lib-tk\", line 74, in __init__
    font = self._set(options)
  File "C:\Programs\Python27\lib\lib-tk\", line 51, in _set
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128)

After patching my installed 2.7.13, the code runs without exception and font is created, with the unrecognized family replaced by Ariel.
Date User Action Args
2017-05-13 06:02:55terry.reedysetrecipients: + terry.reedy, culler, serhiy.storchaka
2017-05-13 06:02:55terry.reedysetmessageid: <>
2017-05-13 06:02:55terry.reedylinkissue30310 messages
2017-05-13 06:02:54terry.reedycreate