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

non ascii characters on windows #26

Closed
Ymiros0 opened this issue Oct 29, 2023 · 2 comments
Closed

non ascii characters on windows #26

Ymiros0 opened this issue Oct 29, 2023 · 2 comments

Comments

@Ymiros0
Copy link

Ymiros0 commented Oct 29, 2023

Nothing too major ig, but at least on windows 10 non ascii characters seem to break when this module is trying to print them, the diff calculation seems to work fine, but when you ask the function to print the string back, non ascii characters break, eg:

>>> print(diff('Mögen','Mägen',as_patch=True))
@@ -1,5 +1,5 @@
 M
-%C3%B6
+%C3%A4
 gen
@JoshData
Copy link
Owner

JoshData commented Nov 6, 2023

I'm not actively maintaining the project but I'll leave the issue open in case anyone can find the problem (although I'm not sure this is a bug, it may be a limitation of how Python on Windows stores Unicode).

@JoshData
Copy link
Owner

JoshData commented Mar 9, 2024

I think this may be the intended behavior of the underlying diff_match_patch library, and it may be based on existing conventions for patch files in the Linux world.

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

No branches or pull requests

2 participants