Repository navigation
fix(shiftjis): decode the complete EUDC block - #445
Merged
Merged
Conversation
b84330808
force-pushed
the
fix-shiftjis-eudc-row-f9
branch
from
November 3, 2026 16:15
0c00a93 to
d72e650
Compare
The Shift_JIS decoder in the Encoding Standard maps pointers 8836 to 10715 (0xF040 to 0xF9FC) to U+E000 to U+E757. The table generator stopped at pointer 10528, so in the last EUDC row only F940 was mapped and F941 to F9FC decoded to U+FFFD followed by the trail byte read as a new character. Use the spec's upper bound and regenerate the table; 187 byte pairs change and nothing else does. Extend encodeSkipVals to the end of the block so the new pairs stay decode-only, like the rest of the EUDC block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
bjohansebas
force-pushed
the
fix-shiftjis-eudc-row-f9
branch
from
November 7, 2026 18:36
d72e650 to
4be5c4e
Compare
bjohansebas
approved these changes
Nov 7, 2026
Member
|
Thanks so much for the PRs, they’re really useful! |
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 generated Shift_JIS table stops the EUDC range at pointer 10528 (bytes
F9 40), leaving 187 valid byte pairs in the last row unmapped. Extend it through pointer 10715 (F9 FC) so the full block decodes to U+E000–U+E757, as required by the Encoding Standard.For example, decoding
F9 FC 41now produces U+E757 followed by ASCII A, instead of U+FFFD followed by A. EUDC characters remain decode-only: encoding uses the configured replacement byte or invokesinvalidCharHandler.Changes
encodings/tables/shiftjis.js. ExtendencodeSkipValsthrough0xF9FCto preserve encoding behavior.Validation
Local validation with Node.js 26.10.0 and Chrome Headless 156:
npm run test:ci: 803 passing, 8 pending per backend. Combined line coverage: 98.52%; all configured coverage thresholds pass.npm run test:webpack: 730 passing, 8 skipped in Chrome.npm run lintandgit diff --check: pass.The eight pending cases are the existing SBCS tests without reference data.
The original implementation was written with Claude Code.