-
-
Notifications
You must be signed in to change notification settings - Fork 16k
RFI: Rebalancing unicode escaping in str::escape_debug for internationalization #159694
Copy link
Copy link
Open
Labels
A-UnicodeArea: UnicodeArea: UnicodeA-strArea: str and StringArea: str and StringC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-UnicodeArea: UnicodeArea: UnicodeA-strArea: str and StringArea: str and StringC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Triggered by discussion in #158286 @rust-lang/libs-api concluded that our debug escapes are escaping too many characters and are not internationalization-friendly.
E.g.
ຄົນສົ່ງໜັງສືcurrently gets escaped toຄ\u{ebb}ນສ\u{ebb}\u{ec8}ງໜ\u{eb1}ງສ\u{eb7}We don't have precise rules ourselves what should and shouldn't be escaped and we'd like to gather input and help from unicode/internationalization experts to find a better balance between various debugging goals and learn what the tradeoffs are.
Once we better understand the tradeoffs and have decided on an approach implementation help, testdata and similar would also be appreciated.
Some desiderata that were brought up during discussion:
A few ligatures getting torn per sentence probably is ok, every other letter getting replaced by an escape wouldn't be
¹ "Any text one could pluck from a random international wikipedia page that isn't about ancient typography"