Repository navigation
gh-160306: Fix iso2022_jp_3 decoding of the JIS X 0213:2000 plane 2 mapping - #160702
Open
kinqsradio wants to merge 1 commit into
Open
kinqsradio wants to merge 1 commit into
kinqsradio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The JIS X 0213:2000 plane 2 emulation sets U+9B1D for cell
0x7D3B, but the following independent table lookup overwrites it with the 2004 mapping, U+9B1C. Make that lookup anelse if, matching the adjacent plane 1 decoder and the EUC/Shift_JIS implementations.The regression test checks the exact encoding and round trip, every two-chunk incremental decode split, and stream reading for both
iso2022_jp_3andiso2022_jp_2004. The latter retains U+9B1C.Validation on a macOS arm64 debug build of current main (
c436e8d83597):./python.exe -m test -j2 test_multibytecodec test_codecencodings_iso2022 test_codecencodings_jp test_codecencodings_cn test_codecencodings_kr test_codecencodings_tw test_codecencodings_hk test_codecs: passed (756 tests run, 17 skipped)../python.exe -m test -R 3:3 test_multibytecodec test_codecencodings_iso2022: passed.iso2022_jp_3cell change, including unchanged invalid-cell results.make patchcheck, Ruff, NEWS lint, andgit diff --check: passed.AI assistance was used to implement and validate this change.
Fixes #160306.
iso2022_jp_3encodes U+9B1D but decodes the result as U+9B1C #160306