python / python/cpython

IDLE: add a Unicode character browser

Ouverte
#152,940 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

stdlib topic-IDLE type-feature
Langage dominant
Python
Étoiles
77.2k
Forks
35.9k
Métriques de merge des PR
Métriques de PR en attente

Description

Feature or enhancement

IDLE has no way to browse or search for a Unicode character. Inserting one requires already knowing its code point (and typing an escape) or pasting it from another application.

Besides making characters easy to insert, such a tool is useful for learning about Unicode — exploring blocks, looking up a character's name, category, and other properties, and seeing how it is written as an escape, as UTF-8 bytes, as an XML or HTML reference, and in the normalization forms.

I propose a Character Browser, similar to KDE's kcharselect and GNOME Characters, added as a CharSelect extension on the Edit menu (available in both the Shell and the editor).

Features:

  • A grid of Unicode blocks selected from a drop-down, scrollable, with hover and selection highlight.
  • Search by character name substring, or by code point in many notations: U+2764, 0x2764, ❤, ❤, a bare hex/decimal number, \u/\U/\x/\N{...}/simple escapes, surrogate pairs, and a UTF-8 byte escape run.
  • A detail panel with three tabs: an Overview (name, code point, decimal), a Repr tab (literal, Python escape, UTF-8 bytes, surrogate pair, XML and HTML references, \N{...}), and a Unicode tab (block, category, bidi, combining, East Asian width, mirrored, decomposition, numeric values, and normalization forms).
  • Insert the character at the cursor of the editor or Shell (replacing any selection, and staying within the Shell's input area), or Copy it to the clipboard. Double-clicking a character in the grid inserts it.
  • On the detail tabs, clicking a value copies it and double-clicking inserts it.

When opened with an editor selection, the browser seeds the search with it.

A PR will follow.

Related (not a duplicate): #80648 (help with invisible characters).

Linked PRs
  • gh-152945

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par examiner l’extension CharSelect proposée dans le menu Edit de IDLE et le PR gh-152945 associé. Comparez l’implémentation aux exigences listées en matière de navigation, de recherche, de détails, d’insertion et de copie de Unicode, à la fois pour la Shell et pour l’éditeur ; terminé signifie que le périmètre convenu est implémenté et vérifié.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
desktop
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.