Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #196329
| From | "Peter J. Holzer" <hjp-python@hjp.at> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Tkinter and astral characters (was: Decoding bytes to text strings in Python 2) |
| Date | 2024-06-24 13:03 +0200 |
| Message-ID | <mailman.166.1719227035.2909.python-list@python.org> (permalink) |
| References | (2 earlier) <mailman.159.1718991773.2909.python-list@python.org> <MPG.40e0d04661dcc7cf9896e0@news.eternal-september.org> <CAPTjJmrOfrz0RoYO9nhB+d+u7m0QLqYqfO2d4nSa4HG+LeLUdg@mail.gmail.com> <41260f11-89ae-433d-b44a-26c604b91356@mrabarnett.plus.com> <20240624110345.k5ojn4j5tmejwu6k@hjp.at> |
[Multipart message — attachments visible in raw view] - view raw
On 2024-06-24 01:14:22 +0100, MRAB via Python-list wrote:
> Tkinter in recent versions of Python can handle astral characters, at least
> back to Python 3.8, the oldest I have on my Windows PC.
I just tried modifying
https://docs.python.org/3/library/tkinter.html#a-hello-world-program
to display "Hello World \N{ROCKET}" instead (Python 3.10.12 as included
with Ubuntu 22.04). I don't get a warning or error, but the emoji isn't
displayed either.
I suspect that the default font doesn't include emojis and Tk isn't
smart enough to fall back to a different font (unlike xfce4-terminal
which shows the emoji just fine).
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Decoding bytes to text strings in Python 2 Rayner Lucas <usenet202101@magic-cookie.co.ukNOSPAMPLEASE> - 2024-06-21 16:49 +0100
Re: Decoding bytes to text strings in Python 2 Chris Angelico <rosuav@gmail.com> - 2024-06-22 03:42 +1000
Re: Decoding bytes to text strings in Python 2 Rayner Lucas <usenet202101@magic-cookie.co.ukNOSPAMPLEASE> - 2024-06-22 13:13 +0100
Re: Decoding bytes to text strings in Python 2 (Posting On Python-List Prohibited) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-06-22 23:19 +0000
Re: Decoding bytes to text strings in Python 2 Chris Angelico <rosuav@gmail.com> - 2024-06-24 09:30 +1000
Re: Decoding bytes to text strings in Python 2 MRAB <python@mrabarnett.plus.com> - 2024-06-24 01:14 +0100
Re: Decoding bytes to text strings in Python 2 Chris Angelico <rosuav@gmail.com> - 2024-06-24 11:43 +1000
Tkinter and astral characters (was: Decoding bytes to text strings in Python 2) "Peter J. Holzer" <hjp-python@hjp.at> - 2024-06-24 13:03 +0200
Re: Decoding bytes to text strings in Python 2 Rayner Lucas <usenet202101@magic-cookie.co.ukNOSPAMPLEASE> - 2024-06-22 13:26 +0100
csiph-web