Skip to content

feat(iconv): support //translit transliteration mode#1136

Merged
chaliy merged 2 commits intomainfrom
feat/issue-1117-iconv-translit
Apr 7, 2026
Merged

feat(iconv): support //translit transliteration mode#1136
chaliy merged 2 commits intomainfrom
feat/issue-1117-iconv-translit

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 7, 2026

Summary

  • Parses //translit suffix on target encoding (e.g. ascii//translit)
  • Non-ASCII characters are mapped to closest ASCII equivalents before encoding
  • Comprehensive character mapping table covering Latin-1, Latin Extended-A, and common diacritics
  • Unknown non-ASCII characters map to ? (matching GNU iconv behavior)

Test plan

  • test_translit_to_ascii — café → cafe
  • test_translit_multiple_diacritics — naïve → naive
  • test_translit_german — Héllo Wörld → Hello World
  • All 14 iconv unit tests pass (11 existing + 3 new)

Closes #1117

Parses //translit suffix on target encoding (e.g. ascii//translit).
When enabled, non-ASCII characters are mapped to closest ASCII
equivalents (é→e, ö→o, ñ→n, etc.) before encoding, matching
GNU iconv behavior used by bashblog and other tools.

Closes #1117
@chaliy chaliy force-pushed the feat/issue-1117-iconv-translit branch from 0b4f298 to 6c8c891 Compare April 7, 2026 02:28
@chaliy chaliy merged commit eb874b7 into main Apr 7, 2026
27 checks passed
@chaliy chaliy deleted the feat/issue-1117-iconv-translit branch April 7, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(iconv): support //translit transliteration mode

1 participant