Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0xFEFF (ZWNBSP) is not correctly handled #431

Open
Rekkonnect opened this issue Jun 5, 2024 · 1 comment
Open

0xFEFF (ZWNBSP) is not correctly handled #431

Rekkonnect opened this issue Jun 5, 2024 · 1 comment

Comments

@Rekkonnect
Copy link

This is a character commonly found in UTF-16-encoded sources. It is not specifically shown within a box when the option ShowBoxForControlCharacters is enabled.

@mgarstenauer
Copy link
Contributor

It looks like AvaloniaEdit is calling Char.IsControl to determine whether the character is a control character.

https://github.com/AvaloniaUI/AvaloniaEdit/blob/master/src/AvaloniaEdit/Rendering/SingleCharacterElementGenerator.cs#L93C42-L93C59

Based on that definition 0xFEFF is not a control character.

VS Code also doesn't treat 0xFEFF as a control character, but it renders it as (unrecognized character). VS Code highlights the character when Editor > Unicode Highlight: Invisible Characters is enabled.

Looks ShowBoxForControlCharacters is working as intended and a new feature is needed handle those kind of characters.

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

No branches or pull requests

2 participants