[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

Marc Culler report at bugs.python.org
Tue May 9 22:09:07 EDT 2017


Marc Culler added the comment:

The attached patch simply decodes string options to the Font._set() method using the utf8 codec.  Other options (which will be numbers) are converted to ascii strings as currently happens.

This makes it possible to use the Font.copy() method without raising an exception when the font family name is not ascii encoded.

----------
keywords: +patch
Added file: http://bugs.python.org/file46855/tkFont.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30310>
_______________________________________


More information about the Python-bugs-list mailing list