GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-160306: Fix iso2022_jp_3 decoding of the JIS X 0213:2000 plane 2 mapping by kinqsradio · Pull Request #160702 · python/cpython

Conversation

@kinqsradio

@kinqsradio kinqsradio commented Oct 26, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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 an else 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_3 and iso2022_jp_2004. The latter retains U+9B1C.

Validation on a macOS arm64 debug build of current main (c436e8d83597):

  • The new regression fails before the C change and passes afterward.
  • ./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.
  • Comparing all 35,344 plane 1 and plane 2 decode results across both ISO-2022 codec editions before and after the change found only the intended iso2022_jp_3 cell change, including unchanged invalid-cell results.
  • make patchcheck, Ruff, NEWS lint, and git diff --check: passed.

AI assistance was used to implement and validate this change.

Fixes #160306.

  • Issue: iso2022_jp_3 encodes U+9B1D but decodes the result as U+9B1C #160306

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kinqsradio
pythongh-160306: Preserve the JIS X 0213:2000 plane 2 mapping in iso2…
4c34c08
…022_jp_3
@kinqsradio
kinqsradio requested a review from corona10 as a code owner October 26, 2026 10:32
@bedevere-app bedevere-app Bot added the awaiting review label Oct 26, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Oct 26, 2026
iso2022_jp_3 encodes U+9B1D but decodes the result as U+9B1C #160306
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

iso2022_jp_3 encodes U+9B1D but decodes the result as U+9B1C

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kinqsradio
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.