Skip to content
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

Closed
buryndin opened this issue Feb 7, 2017 · 4 comments
Closed

Problem with cyrillic #169

buryndin opened this issue Feb 7, 2017 · 4 comments

Comments

@buryndin
Copy link

buryndin commented Feb 7, 2017

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!

@Pr1st0n
Copy link

Pr1st0n commented Mar 1, 2017

Experiencing same issue.
I think comment-71026452 would be helpfull for you.

@buryndin
Copy link
Author

buryndin commented Mar 2, 2017

Ok, but how can I solve problem with cyrillic?

@Pr1st0n
Copy link

Pr1st0n commented Mar 2, 2017

Have not found a proper solution yet. But I think I'll try to fix this soon.

@Pr1st0n Pr1st0n mentioned this issue Mar 3, 2017
@benjamine
Copy link
Owner

unicode support into text diffs was fixed recently:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants