[New-bugs-announce] [issue32863] Missing support for Emojis in tkinter

Victor Domingos report at bugs.python.org
Sat Feb 17 08:42:30 EST 2018


New submission from Victor Domingos <editor.arcosonline at gmail.com>:

In the current Python 3.7.0b1, on macOS 10.12.6 Sierra (also on 10.11 El Capitan), which seems to include a newer Tcl/tk version, it still does not support a variety of UTF characters, including Emoji characters that nowadays are of very common use. A quick search on the web returns some hints that maybe Tcl/tk could be compiled with different options in order to unlock those characters:

http://wiki.tcl.tk/515
https://core.tcl.tk/tk/tktview/6c0d7aec6713ab6a7c3e12dff7f26bff4679bc9d

I am not sure if it is officially supported by now, but at least for me, as a Python and tkinter user, it would be a great improvement.

Thanks in advance,

With best regards,
Victor Domingos


My current version:

Python 3.7.0b1 (v3.7.0b1:9561d7f501, Jan 30 2018, 19:10:11) 
[Clang 6.0 (clang-600.0.57)] on darwin


Sample code that fails:

import tkinter as tk
import tkinter.ttk as ttk
app = tk.Tk()
b = ttk.Button(app, text="📩")


-------

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py", line 614, in __init__
    Widget.__init__(self, master, "ttk::button", kw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py", line 559, in __init__
    tkinter.Widget.__init__(self, master, widgetname, kw=kw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2293, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: character U+1f4e9 is above the range (U+0000-U+FFFF) allowed by Tcl

----------
components: Tkinter, Unicode, macOS
messages: 312279
nosy: Victor Domingos, ezio.melotti, gpolo, ned.deily, ronaldoussoren, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Missing support for Emojis in tkinter
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32863>
_______________________________________


More information about the New-bugs-announce mailing list