Closed AlabasterAxe closed 1 year ago
For future reference if other people are experiencing this. This seems to have been caused by our application only attempting to remove a single character of an emoji when a user pressed backspace before an emoji
I do have the same problem with identical strings, also containing emojis. Will investigate asap.
Are you sure they're identical? This error can happen if the emoji only differ by a single surrogate unicode character.
For example these two emoji differ by only a single character: 👈 (0xD83D, 0xDC49) and 👌 (0xD83D, 0xDC4C)). So if you diff long strings containing them, the diff will contain a single emoji byte which will cause uri encode to fail.
I'm still trying to work through what diff generated this but I figured I'd file this and can add more information as I discover it.
It looks like when diffing long strings with json diff patch, googles diff match patch utility can throw this malformed URI error.