nuxodin/diff_match_patch-php — comment on commit e4e35e4eb128b921a1c4b3907199a053538d6295
File:  line 0
By davman99:

If you try and patch multibyte strings in, then diff_commonPrefix can return with an off-by-one error. My test case was:

Original:
The quick brown fox jumped over the lazy dog ©

To:
The quick brown fox jumped over the lazy dog ©∆

in this case, diff_commonPrefix indicated that the common prefix ran all the way up to the < of the closing i tag. Using this, the patch resulted in:

The quick brown fox jumped over the lazy dog ©<