I encountered a strange behavior in syrup, where fuzzing the codec with random strings did not round-trip the data. Starting with a string of random length where every character in that string was a number in the full two-byte range, encoding these strings with TextEncoder, then decoding the resulting bytes with TextDecoder, produced a different string than the original. This might be expected behavior, not not behavior I understand.
It is likely this occurs when the randomly generated string corresponds to invalid sequences of surrogate pairs.
I encountered a strange behavior in
syrup
, where fuzzing the codec with random strings did not round-trip the data. Starting with a string of random length where every character in that string was a number in the full two-byte range, encoding these strings with TextEncoder, then decoding the resulting bytes with TextDecoder, produced a different string than the original. This might be expected behavior, not not behavior I understand.It is likely this occurs when the randomly generated string corresponds to invalid sequences of surrogate pairs.