Skip to content

Fix bytes handling#2

Merged
codeofdusk merged 1 commit into
codeofdusk:masterfrom
Danstiv:Fix-bytes-handling
May 11, 2024
Merged

Fix bytes handling#2
codeofdusk merged 1 commit into
codeofdusk:masterfrom
Danstiv:Fix-bytes-handling

Conversation

@Danstiv

@Danstiv Danstiv commented May 11, 2024

Copy link
Copy Markdown
Contributor

Now, instead of bytes, we are working with python strings, which solves the problem with returning invalid Unicode.

Now, instead of bytes, we are working with python strings, which solves the problem with returning invalid Unicode.
@Danstiv

Danstiv commented May 11, 2024

Copy link
Copy Markdown
Contributor Author

After the previous pr some problems were noticed, this pr should solve them.

@codeofdusk

Copy link
Copy Markdown
Owner

This appears to effectively be a partial revert of #1, which re-introduces nvaccess/nvda#16027 (closed as "intended behaviour" in upstream per JoshData/fast_diff_match_patch#26 (comment)). I think the difflib fallback is probably the best we can do under the circumstances unfortunately.

@codeofdusk codeofdusk closed this May 11, 2024
@codeofdusk

Copy link
Copy Markdown
Owner

Are you able to reproduce the issues noted in nvaccess/nvda#16483 (comment) by using utf-32 instead of utf-8?

@Danstiv

Danstiv commented May 11, 2024

Copy link
Copy Markdown
Contributor Author

Please read conversation at nvaccess/nvda#16483

This revert will not lead to problems with emoji processing, since this problem is solved on the fast diff match patch side.

With the current implementation, I'm seeing significant regression, for example when restarting Home assistant using ha core restart, a large number of exceptions are thrown, probably about 10 per second.

@Danstiv

Danstiv commented May 11, 2024

Copy link
Copy Markdown
Contributor Author

fast diff match patch simply not working with utf-32.
I'll double check now just in case.

@codeofdusk codeofdusk reopened this May 11, 2024
@codeofdusk

Copy link
Copy Markdown
Owner

This revert will not lead to problems with emoji processing, since this problem is solved on the fast diff match patch side.

Ah nice!

@codeofdusk codeofdusk merged commit 6a97cc7 into codeofdusk:master May 11, 2024
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 this pull request may close these issues.

2 participants