IDLE: add a Unicode character browser
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先檢查 IDLE 的 Edit 選單中提議的 CharSelect 擴充功能,以及連結的 PR gh-152945。針對 Shell 和編輯器,分別將實作與列出的 Unicode 瀏覽、搜尋、詳細資訊、插入和複製需求進行比較;完成表示已實作並驗證約定的範圍。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- desktop
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100