See #3281 (comment).
I think the code will fail if the split is in the middle of a unicode character that uses more than 1 byte to represent. Better Ensure the max length of a string is already present in the buffer (as it was previously), or create a temporary byte buffer with all the data which you then convert to a string in one go using the encoding.
See #3281 (comment).
I think the code will fail if the split is in the middle of a unicode character that uses more than 1 byte to represent. Better
Ensurethe max length of a string is already present in the buffer (as it was previously), or create a temporary byte buffer with all the data which you then convert to a string in one go using theencoding.