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

Support creating text with unicode chars #334

Merged
merged 1 commit into from
Apr 2, 2021

Conversation

nemanja-tosic
Copy link
Contributor

Creating a text with a unicode character results in the unicode characted being split. If used with the rust backend it results in an ugly runtime error.

See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split

There is a warning in there:

Warning: When the empty string ("") is used as a separator, the string is not split by user-perceived characters (grapheme clusters) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys surrogate pairs. See “How do you get a string to a character array in JavaScript?” on StackOverflow.

I did not do an extensive check of the codebase for this issue, just fixed the most critical path for us at this point.

@ept ept merged commit d41001d into automerge:performance Apr 2, 2021
@ept
Copy link
Member

ept commented Apr 2, 2021

I've meant to fix this but keep forgetting. Thank you for the contribution!

echarles pushed a commit to datalayer-externals/automerge-classic-arch that referenced this pull request Feb 16, 2023
…xt-at

Add object replacement character in text_at
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

Successfully merging this pull request may close these issues.

2 participants