feat: add NFKC normalization to autocomplete#1267
Open
Asraye wants to merge 1 commit into
Open
Conversation
Signed-off-by: AsrayeDev <asrayeofficial@gmail.com>
Pecacheu
approved these changes
Jun 12, 2026
Dadadah
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds NFKC normalization to autocomplete, so things such as "𝑨𝒔𝒓𝒂𝒚𝒆" will show up in user mentions, or "𝑪𝒉𝒆𝒆𝒔𝒆" in channel/role mentions.
We only have to normalize the
label, we keep display label as the formatted text as It gives a better user-feedback.
Thought I'd add this section, as a lot of people don't know the beautiful thing of NFKC!What Is NFKC?
NFKC stands for "Normalization Form Compatibility Composition". It's an unicode normalization form that converts text into a standardized representation by applying compatibility mappings and then recomposing characters where possible :P
This is good as it means that many accented or otherwise stylized unicode characters are converted into more standard equivalents, for example:
𝑪𝒉𝒆𝒆𝒔𝒆becomesCheeseand①becomes1We can use NFKC here as it helps autocomplete work more consistently with accented or stylized text. Compared to NFC (Normalization Form Canonical Composition), NFKC is more aggressive and normalizes a wider range of visually similar characters, which is better suited for this usage.
How was this PR tested?
Tested locally with all autocompletes.
Screenshots & Screencasts (if appropriate)
Checklist:
Please declare, if any, LLM usage involved in creating this PR
None
...