When inserting a new utf-16 surrogate next to an existing surrogate with replaceData, the surrogates would not get merged correctly into a single code point. This is because internally the text data is stored as utf-8, and the two surrogates would be converted separately. This has now been fixed by first recreating the whole string in utf-16 and then converting it back to utf-8.
It's not the most efficient solution, but this fixes at least 6 WPT subtests.
I've tried to follow all the contribution guidelines, but this is my first pull request here, so tell me if I've done anything wrong/unidiomatic.
When inserting a new utf-16 surrogate next to an existing surrogate with replaceData, the surrogates would not get merged correctly into a single code point. This is because internally the text data is stored as utf-8, and the two surrogates would be converted separately. This has now been fixed by first recreating the whole string in utf-16 and then converting it back to utf-8.
It's not the most efficient solution, but this fixes at least 6 WPT subtests.
I've tried to follow all the contribution guidelines, but this is my first pull request here, so tell me if I've done anything wrong/unidiomatic.