Tkinter and astral characters (was: Decoding bytes to text strings in Python 2)

Liste des GroupesRevenir à cl python 
Sujet : Tkinter and astral characters (was: Decoding bytes to text strings in Python 2)
De : hjp-python (at) *nospam* hjp.at (Peter J. Holzer)
Groupes : comp.lang.python
Date : 24. Jun 2024, 13:03:45
Autres entêtes
Message-ID : <mailman.166.1719227035.2909.python-list@python.org>
References : 1 2 3 4 5 6 7
Pièces jointes : signature.asc (application/pgp-signature)
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!"


Date Sujet#  Auteur
21 Jun 24 * Decoding bytes to text strings in Python 210Rayner Lucas
21 Jun 24 +* Re: Decoding bytes to text strings in Python 27Chris Angelico
22 Jun 24 i`* Re: Decoding bytes to text strings in Python 26Rayner Lucas
23 Jun 24 i +- Re: Decoding bytes to text strings in Python 2 (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
24 Jun 24 i +- Re: Decoding bytes to text strings in Python 21Chris Angelico
24 Jun 24 i +- Re: Decoding bytes to text strings in Python 21MRAB
24 Jun 24 i +- Re: Decoding bytes to text strings in Python 21Chris Angelico
24 Jun 24 i `- Tkinter and astral characters (was: Decoding bytes to text strings in Python 2)1Peter J. Holzer
21 Jun 24 `* Re: Decoding bytes to text strings in Python 22Stefan Ram
22 Jun 24  `- Re: Decoding bytes to text strings in Python 21Rayner Lucas

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal