fix(libSceCesCs): map the strict JIS X 0208 profiles' unsettled cells as the console does #10718
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10718"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-24T19:09:46Z.
What
The strict JIS X 0208 profiles (
sceCesUcsProfileInitSJis1997X0208,sceCesUcsProfileInitEucJpX0208,X0208Ss2andX0208Ss2Ss3) threw on the cells whose console mapping was unknown: JIS cell0x2140, U+FF3C, and in the Shift-JIS profile the bytes0x5Cand0x7Eand U+005C, U+007E, U+00A5 and U+203E. They now map them as a PS5 does.I measured every profile on a PS5 with homebrew payloads that load the console's
libSceCesCs.sprxand callsceCesMbcToUtf32on every one- and two-byte sequence andsceCesUtf32ToMbcon every value from U+0000 to U+110001. On the console:0x2140is U+005C in the Shift-JIS profile and U+FF3C in the three EUC-JP profiles, both ways.0x5Cand0x7Eare JIS X 0201 Roman: U+00A5 and U+203E, both ways. U+005C encodes as0x815F; U+007E and U+FF3C are unassigned.0x213D(0x815C/0xA1BD) is U+2014, not CP932's U+2015, which is unassigned. This is the one cell that differs from the table besides the six JIS0208.TXT changes the profiles already had.0xA1EFand U+203E as0xA1B1, which decode as U+FFE5 and U+FFE3.With the change, the JIS X 0208 two-byte decode of each strict profile hashes the same as the console's sweep (6879 assigned cells: EUC-JP
0xC1C98702, Shift-JIS0x0CE46B27), and the encode and decode sweeps of these profiles match the console apart from topics outside this PR (the EUC single bytes and the error lengths, both separate).Tested
guest_ces_japanese: the sweeps over all 94×94 cells of the strict EUC-JP and Shift-JIS profiles now count 6879 cells and check the hash computed from the console dump. The test also checks0x2140both ways in each profile,0x815C/0xA1BD↔ U+2014 with U+2015 unassigned, the Shift-JIS0x5C/0x7Eround trips and U+005C →0x815F, the EUC-JP one-way U+00A5/U+203E forms, and an MBCS string with0x5C; the throw checks are gone. The otherguest_ces*tests still pass.guest_ces*sources pass, built against thisExport.cpp.1a8c979023(same tree as the verified9cfa98bffe; verify run on my fork; Ubuntu 24.04, GCC, Release, lavapipe): everyguest_ces*test passes. Its one failure,pr_overlap_encoding, fails the same way onmainon that runner (the base side of the same run).check_conventions.pypasses.pr_overlap.pyreports #10056, #10185 and #10186 on the sameExport.cpplines, theGuestCesJapanese.cppchecks and the debt entries; none changes the strict profiles. #10186 measured the CP932 and CP51932 encoders on a PS5 and agrees with this on the cells both touch (U+00A5 →0xA1EFand U+203E →0xA1B1in EUC-JP).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T19:22:32Z.
Review: APPROVED
Reviewed at head
9cfa98bffee932d23d00c0bd43f0ed2ca7e46443. The profile-specific handling is consistent across decoding and reverse-table encoding: strict Shift-JIS maps 0x2140 to U+005C, applies JIS X 0201 Roman for 0x5C/0x7E, and leaves the stated unassigned values unassigned; EUC-JP keeps ASCII behavior while applying its measured 0x2140 and one-way yen/overline fallbacks. The separate reverse tables avoid changing CP932/CP51932 behavior. The exhaustive console-derived digest assertions and explicit boundary/round-trip checks are useful coverage.git diff --check upstream/main...HEADandpython3 tools/check_conventions.py --base upstream/mainpass locally. The PR is mergeable and hosted intake/conventions/labels are green; hosted product builds/tests are skipped by policy. I could not run the CES target locally during this session, so I am relying on the documented PS5 sweeps and the reported macOS build; the linked Linux run shows onepr_overlap_encodingfailure on both base and change, which is reported as baseline-specific.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T20:20:51Z.
Review: APPROVED
Reviewed the complete diff at 1a8c9790236975919c8a50504e01917aa7b23b90. The strict profile mapping now differentiates the PS5-measured Shift-JIS and EUC-JP behavior for cell 0x2140, Shift-JIS Roman bytes, EUC fallback encodings, and cell 0x213D; reverse tables use the matching strict profile. The PR reports full console sweeps over byte sequences and Unicode scalars, matching assigned-cell counts/digests, plus passing macOS and hosted Linux CES test suites. Conventions and labels passed; product Linux/Windows jobs were skipped under workflow policy.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T02:56:46Z.
Review: DISMISSED
The updated mapping and exhaustive console-derived assertions look consistent, but the required overlap declaration is incomplete. #10722 lists this PR in its overlap report and changes the same CES decoder/encoder paths in Export.cpp. CONTRIBUTING.md requires the authors to agree on merge order and declare it with
Depends on. Please coordinate with #10722 and update both checklists to name the agreed order; the currentDepends on: nonedoes not record it. I have not modified or rebased your branch. Hosted conventions, eligibility, labels and report checks pass; product build/test jobs are skipped. My earlier approvals apply only to the old head, not this updated head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:25:24Z.
Review: APPROVED
Reviewed exact head b96b3434e077a503456683112a4c3a7f1d8082d4. The stack is recorded consistently: #10722 is the immediate parent and this commit applies the strict JIS X 0208 profile mapping on top. The profile-specific decode and reverse-encode paths agree for 0x2140, Shift-JIS Roman 0x5C/0x7E, the measured 0x213D mapping, and EUC-JP fallbacks; non-strict CP932/CP51932 behavior remains on its existing tables. The exhaustive digest and explicit regression assertions cover the changed cells and round trips. Local and pass. Hosted eligibility, labels and current conventions pass; product builds are skipped by workflow policy. I did not rerun the console sweeps or macOS/Linux CES test suite locally; those remain author-reported, and the linked Linux overlap failure is reported on base as well.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T04:25:32Z.
Review: APPROVED
Reviewed exact head b96b3434e077a503456683112a4c3a7f1d8082d4. The stack is recorded consistently: #10722 is the immediate parent and this commit applies the strict JIS X 0208 profile mapping on top. The profile-specific decode and reverse-encode paths agree for 0x2140, Shift-JIS Roman 0x5C/0x7E, the measured 0x213D mapping, and EUC-JP fallbacks; non-strict CP932/CP51932 behavior remains on its existing tables. The exhaustive digest and explicit regression assertions cover the changed cells and round trips. Local and All conventions checks passed. pass. Hosted eligibility, labels and current conventions pass; product builds are skipped by workflow policy. I did not rerun the console sweeps or macOS/Linux CES test suite locally; those remain author-reported, and the linked Linux overlap failure is reported on base as well.