Proposal: Unicode-aware text (Unicode.*) — code points, graphemes, case mapping for localization #13
Labels
No labels
area:ci
area:docs
area:input
area:net
area:rendering
area:repo
area:stdlib
area:tooling
area:types
cleanup
dx
priority:high
priority:low
priority:medium
proposal
status:in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: workshopsoft/ludic#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Make Ludic text truly Unicode-aware: correct handling of UTF-8, code
points, grapheme clusters, and case mapping — so player names, translated UI,
and chat behave correctly for every language.
Why it matters for game devs
without cutting a character in half.
iteration, not byte counting.
Current gap
Text.*exists but is largely byte-oriented (Text.length,Text.char_at,Text.slice). For non-ASCII this returns wrong lengths and can split multi-bytecharacters, producing mojibake.
Proposed API (illustrative)
upper/lower/casefold).Considerations
heavy. Document the Unicode version supported.
Text.*stays for performance; Unicode API is the correct-by-defaultlayer. Clarify which is which in docs.
Scope / acceptance
Unicodenamespace: chars/graphemes/len/case/validate/truncate.Related: #2 (Text namespace), Filesystem & IO, Regex.