rashid2538 / php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.
GNU General Public License v2.0
69 stars 48 forks source link

Special character problem #3

Closed next-direction closed 10 years ago

next-direction commented 11 years ago

Hi,

I like you class, but I had a problem with german characters like ä, ü, ö.

Solution for me is, to replace the Explode funtion with the following code:

private function Explode( $value ) { return preg_split('//u', $value); }

That splits a string using UTF8 encoding.

onassar commented 11 years ago

Good idea. Can you confirm that will work with the rest of the logic @rashid2538 ?

next-direction commented 11 years ago

Until now I don't have any problems with it.

Tested with:

rashid2538 commented 11 years ago

Thank you so much for your comments. Even I've not tested it with Unicode characters in HTML earlier. But now as @onassar suggested I'll update the code very soon after validating.

rashid2538 commented 10 years ago

@jumper85 I think now there's no issue you're getting in the code.

ferrizzi commented 9 years ago

There's still an issue, try diffing "Crédito" and "Créditos", it results in "Créditoditos"