ajaxorg / ajaxorg/ace

UTF-16 surrogate pairs largely unsupported

Open
#1,153 10 comments 7 reactions 0 assignees View on GitHub
bug effort/large no-autoclose p1
Dominant language
JavaScript
Stars
27.1k
Forks
5.3k
PR merge metrics
No merged PRs in 30d

Description

If you take the character "[ok, so GitHub also does not support this character, but it is the one you can copy/paste from this website: http://www.codetable.net/decimal/119558]" and paste it into an ACE instance, it looks pretty much ok, but it acts as if it were not one, but two characters: you can actually position your cursor halfway through the character, and you are further able to delete either only the first or only the second half. I presume (but might totally be off-base) that this is because this character is too high to be represented as UCS-2 (as in, is a non-BMP character), and thereby uses a UTF-16 surrogate pair; as JavaScript strings are more akin to a C array than a real string, the underlying representation in the string type involves both individual "characters" (really, "UTF-16 code units" in this particular case). Is it possible for characters like this to become better supported?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.