Add a Unicode & Invisible Character Inspector tool

Đã đóng
#420 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@srikar-naidu đang làm issue này rồi.

Từ ngày 29/10/2026.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nextjs, typescript

Hướng nghiên cứu

Start by reading CONTRIBUTING.md's new-tool checklist and inspect the existing tool registry, tool pages, client components, and tests. Build the Unicode inspection and normalization logic in lib/ with tests for the listed edge cases, then follow the checklist for the page, registry, OG image, JSON-LD, sitemap, README, package keyword, and bug-report dropdown. Done means the listed acceptance criteria pass, including the lint, test, and build commands.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
What problem does this solve?

Text that looks identical can contain different Unicode characters, invisible whitespace, or different normalization forms. This can cause unexpected behavior when comparing strings, debugging pasted text, or inspecting identifiers.

Toolbelt has encoding and text-conversion tools, but no dedicated way to inspect the characters behind a string.

Proposed solution

Add a fully client-side tool at /unicode-inspector that breaks text down into Unicode code points and makes invisible characters visible.

Scope
  • Provide a labeled textarea that updates the inspection results as users type.
  • Display one row per Unicode code point, showing:
    • The character or a visible placeholder for whitespace/control characters.
    • Its code point, such as U+0041.
    • Its zero-based UTF-16 offset in the original input.
    • Its UTF-16 code units and UTF-8 bytes in hexadecimal.
  • Identify common invisible characters, including:
    • Space, tab, LF, and CR.
    • Non-breaking space (U+00A0).
    • Zero-width space (U+200B).
    • Zero-width non-joiner/joiner (U+200C / U+200D).
    • Byte order mark (U+FEFF).
    • Bidirectional formatting controls.
  • Explain that some invisible characters are intentional, including joiners used in emoji and writing systems.
  • Show separate counts for UTF-16 code units, Unicode code points, and UTF-8 bytes.
  • Provide NFC and NFD normalization previews with an indication of whether normalization changes the input.
  • Allow copying either normalized result without changing the original input.
  • Include examples containing combining accents, emoji, and invisible whitespace.
Acceptance criteria
  • Supplementary characters such as emoji appear as one code-point row with two UTF-16 code units.
  • Combining sequences remain separate code-point rows and are not presented as single user-perceived characters.
  • CRLF input displays CR and LF separately.
  • Invisible characters have readable labels rather than blank cells.
  • Unpaired UTF-16 surrogates are flagged explicitly; the UI explains that UTF-8 encoding replaces them with U+FFFD.
  • NFC/NFD previews correctly distinguish composed and decomposed text, such as é and e followed by U+0301.
  • Input is displayed as text and never interpreted as HTML.
  • Large inputs have a documented inspection limit and a clear truncation message.
  • Controls are keyboard accessible and results remain readable in both themes.
  • Pure inspection and normalization logic lives in lib/ with tests covering ASCII, emoji, combining marks, invisible characters, and unpaired surrogates.
  • Complete the new-tool checklist in CONTRIBUTING.md, including the registry entry, page, client component, OG image, JSON-LD, sitemap, README gallery/list, package keyword, and bug-report dropdown.
  • npm run lint && npm run test && npm run build pass.

A complete Unicode character-name database, confusable-character detection, automatic removal of invisible characters, and grapheme-cluster segmentation are outside v1 scope.

Fit
  • This can work entirely in the browser with no server or data leaving the tab.
Ngôn ngữ chính
TypeScript
Star
1
Fork
9
Merge trung bình
7 giờ 10 phút
Pull request đã merge (30 ngày)
200

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codercops/toolbelt

Tất cả issue của codercops/toolbelt

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.