New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with cyrillic #169
Comments
Experiencing same issue. |
Ok, but how can I solve problem with cyrillic? |
Have not found a proper solution yet. But I think I'll try to fix this soon. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When diff_match_patch library calculates diff for string with cyrillic symbols It encode result with encodeURI function. So jsondiffpatch returns incorrect diffs. For example for strings
left:
Здесь ты всегда можешь посмотреть подсказки, чтобы играьт было еще веселее и интереснее!
right:
Здесь ты всегда можешь посмотреть подсказки, чтобы играть было еще веселее и интереснее!
it returns
[ '@@ -52,10 +52,10 @@\n %D0%B8%D0%B3%D1%80%D0%B0\n-%D1%8C\n %D1%82\n+%D1%8C\n %D0%B1%D1%8B%D0%BB\n', 0, 2 ]
instead of
[ '@@ -52,10 +52,10 @@\n игра\n-ь\n т\n+ь\n был\n', 0, 2 ]
It may be fixed by removing
encodeURI
from this line. But I'm not sure that's enough. But it certainly works!The text was updated successfully, but these errors were encountered: