diff-match-patch icon indicating copy to clipboard operation
diff-match-patch copied to clipboard

Fix internal encoding left on UCS-2LE after switching to UCS-4LE.

Open Matt-Kelly- opened this issue 5 years ago • 0 comments

After switching from UCS-2LE to UCS-4LE, the internal encoding is not updated but left on UCS-2LE. This means that mb_* functions using the default internal encoding will not return the correct results. I've included a simple text case of replacing an emoji from outside the Unicode BMP with another. Before this fix, it was generating a diff with partial multibye characters, which could not be converted back to the internal encoding.

Matt-Kelly- avatar Mar 26 '20 01:03 Matt-Kelly-