-
Notifications
You must be signed in to change notification settings - Fork 148
UTF-8 diff patch #11
Comments
Actually I removed ENT_HTML5 on the diff patch because this fails on PHP < 5.4, so here is the static method : private static function _htmlentities($input) { |
See this https://github.com/xrstf/PHP-FineDiff |
Was this merged into the core? |
@fr-freelance can you upload patch again? |
There is a PR here, you could try to patch it manually. I just don't maintain this project anymore, and the purpose was to have efficient diff for ASCII-based text using PHP -- so that PR would defeat the primary purpose of the project, hence I never merged it. |
Here is the download link. |
The example on that page: http://www.raymondhill.net/finediff/viewdiff-ex.php work perfect for me with Latin and Cyrillic symbols. I follow the instructions for usage, but only work with Latin symbols. When i try to diff strings with Cyrillic, here is the result: |
@baceto90 it works this way ok for cyrillic
|
Hello guys,
Thanks for this great library. As my dev computer is in PHP.5.4 and my other servers in PHP 5.3, there are many changes about UTF-8. I try to reduce the amount of modified code to handle this the simple way : replace htmlentities() call to a private static method with force the UTF-8 encoding.
private static function _htmlentities($input) {
return htmlentities($input, ENT_NOQUOTES | ENT_HTML5, 'UTF-8');
}
Download all the patch here:
http://dl.dropbox.com/u/62007491/diff-utf8-finediff.patch
Thanks for considering this patch. Hope this helps.
The text was updated successfully, but these errors were encountered: