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

Fix decompression of unicode values above 2047 #3385

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

jepler
Copy link
Member

@jepler jepler commented Sep 9, 2020

Two problems: The lead byte for 3-byte sequences was wrong, and one mid-byte was not even filled in due to a missing "++"!

Apparently this was broken ever since the first "Compress as unicode, not bytes" commit, but I believed I'd "tested" it by running on the Pinyin translation.

This rendered at least the Korean and Japanese translations completely illegible, affecting 5.0 and all later releases.

Testing performed: Ran the japanese translation in the unix port:

$ ./micropython -c '1/0'
トレースバック(最新の呼び出しが末尾):
  ファイル "<stdin>", 行 1, in <module>
ZeroDivisionError: ゼロ除算 (division by zero)

Two problems: The lead byte for 3-byte sequences was wrong, and one
mid-byte was not even filled in due to a missing "++"!

Apparently this was broken ever since the first "Compress as unicode,
not bytes" commit, but I believed I'd "tested" it by running on the
Pinyin translation.

This rendered at least the Korean and Japanese translations completely
illegible, affecting 5.0 and all later releases.
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@dhalbert dhalbert merged commit 715b8d5 into adafruit:5.3.x Sep 9, 2020
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