feat(libSceCesCs): convert EUC-KR, UHC and Big5 through the CP949 and CP950 tables #7884

Merged
jacob6769 merged 1 commit from upstream-pr/7884 into main 2026-10-21 11:39:27 +00:00
jacob6769 commented 2026-10-19 12:22:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jacob6769 on 2026-10-19T12:22:24Z.


What

Implements the Korean and Traditional Chinese conversions that #7848 leaves as throwing stubs, plus the three profile constructors they need.

  • Declares sceCesUcsProfileInitEucKr, sceCesUcsProfileInitUhc and sceCesUcsProfileInitBig5Cp950. Like the existing EUC-JP profile, they tag the caller's sheet. The names are in the aerolib table pinned by tools/nid_names.py (uAiUQEGDoNM, kWjWUyOGZQs, Lota-iiR+8M); signatures follow the Orbital type database.
  • Implements sceCesEucKrToUtf8, sceCesUhcToUtf8 and sceCesBig5ToUtf8. Each call converts one character, including zero, and writes no terminator. Argument checks follow the same order as sceCesEucJpToUcs2, and on failure the output and length pointers are left unchanged.
  • The MBCS context conversions (sceCesMbcsStrToUtf8Str, sceCesUtf8StrToMbcsStr, the UCS-2 forms and the Get*Len forms) accept the three profiles in both directions.
  • Cp949.hpp (17,048 cells) and Cp950.hpp (13,503 cells) are generated from Microsoft's CP949.TXT and CP950.TXT.
    • EUC-KR is CP949 limited to lead and trail bytes 0xA1-0xFE (KS X 1001, 8,226 cells).
    • UHC adds leads from 0x81 and the extended Hangul trails 0x41-0x5A, 0x61-0x7A and 0x81-0xA0.
    • The user-defined areas, which Windows maps to the Private Use Area, answer UNASSIGNED_CODE.
    • Big5 has ten characters with two cells. Encoding takes the lower cell, except U+2550, U+255E, U+2561, U+256A, U+5341 and U+5345, which take the higher one. This matches Windows' WideCharToMultiByte for code page 950 and the WHATWG Encoding Standard.
  • Console behaviour (tables, errors, sheet layout) is not measured; it is recorded in docs/dev/debt/libSceCesCs.md.

Progress scanner: 3893/4738 (82.17%) to 3899/4741 (82.24%).

Left for follow-ups: the KS X 1003 single-byte profile (sceCesEucKrUcsProfileSetSbcs, sceCesRefersUcsProfileKsX1003), and the other EUC-KR, UHC and Big5 scalar forms (UCS-2, UTF-16, UTF-32 and the reverse directions), which are not declared yet.

Overlap: merges cleanly with #7848. With #7091, the profile checks in toMbcs and fromMbcs conflict on one line each; whichever lands second adds isSjis to isMbcs. tools/pr_overlap.py also lists #6044 (test reorganization, which conflicts with main) as sharing libSceCesCs/CMakeLists.txt without a comparison; it implements none of these functions.

Tested

Windows 11, WinLibs MinGW-w64 GCC 15.2.0, Release, BUILD_TESTING=ON.

  • Table source: every cell of CP949.TXT and CP950.TXT matches both Windows' MultiByteToWideChar (code pages 949 and 950) and Python's cp949 and cp950 codecs, with no differences.
  • New guest_ces_dbcs and guest_ces_dbcs_module tests:
    • Every two-byte input (65,536 per profile) goes through the three *ToUtf8 exports. The FNV-1a hash of the results matches values computed independently in Python from the unicode.org files.
    • Explicit error cases, with outputs left unchanged on failure.
    • String conversions in both directions.
    • A full decode-encode round trip through the context: no mismatches for EUC-KR and UHC, and exactly the ten duplicate cells for Big5.
  • Narrowing one UHC trail range on purpose makes guest_ces_dbcs fail; restoring it passes.
  • ctest -R "^guest_ces|progress|test_registration": 11/11 passed. The full suite was not run.
  • tools/check_conventions.py and tools/check_test_registration.py pass. tools/pr_overlap.py reports only the #7091 lines and #6044 above.
  • No console or title was run.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file (none added)
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4920854211 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884). Originally posted by [jacob6769](https://github.com/jacob6769) on 2026-10-19T12:22:24Z. --- ### What Implements the Korean and Traditional Chinese conversions that #7848 leaves as throwing stubs, plus the three profile constructors they need. - Declares `sceCesUcsProfileInitEucKr`, `sceCesUcsProfileInitUhc` and `sceCesUcsProfileInitBig5Cp950`. Like the existing EUC-JP profile, they tag the caller's sheet. The names are in the aerolib table pinned by `tools/nid_names.py` (`uAiUQEGDoNM`, `kWjWUyOGZQs`, `Lota-iiR+8M`); signatures follow the [Orbital type database](https://github.com/AlexAltea/orbital/blob/b321fcdbd700cc02da1cb1ad25412781d5ec73c6/tools/ida/db_types.json). - Implements `sceCesEucKrToUtf8`, `sceCesUhcToUtf8` and `sceCesBig5ToUtf8`. Each call converts one character, including zero, and writes no terminator. Argument checks follow the same order as `sceCesEucJpToUcs2`, and on failure the output and length pointers are left unchanged. - The MBCS context conversions (`sceCesMbcsStrToUtf8Str`, `sceCesUtf8StrToMbcsStr`, the UCS-2 forms and the `Get*Len` forms) accept the three profiles in both directions. - `Cp949.hpp` (17,048 cells) and `Cp950.hpp` (13,503 cells) are generated from Microsoft's [CP949.TXT](https://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP949.TXT) and [CP950.TXT](https://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT). - EUC-KR is CP949 limited to lead and trail bytes `0xA1`-`0xFE` (KS X 1001, 8,226 cells). - UHC adds leads from `0x81` and the extended Hangul trails `0x41`-`0x5A`, `0x61`-`0x7A` and `0x81`-`0xA0`. - The user-defined areas, which Windows maps to the Private Use Area, answer `UNASSIGNED_CODE`. - Big5 has ten characters with two cells. Encoding takes the lower cell, except U+2550, U+255E, U+2561, U+256A, U+5341 and U+5345, which take the higher one. This matches Windows' `WideCharToMultiByte` for code page 950 and the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/#index-big5-pointer). - Console behaviour (tables, errors, sheet layout) is not measured; it is recorded in `docs/dev/debt/libSceCesCs.md`. Progress scanner: 3893/4738 (82.17%) to 3899/4741 (82.24%). Left for follow-ups: the KS X 1003 single-byte profile (`sceCesEucKrUcsProfileSetSbcs`, `sceCesRefersUcsProfileKsX1003`), and the other EUC-KR, UHC and Big5 scalar forms (UCS-2, UTF-16, UTF-32 and the reverse directions), which are not declared yet. Overlap: merges cleanly with #7848. With #7091, the profile checks in `toMbcs` and `fromMbcs` conflict on one line each; whichever lands second adds `isSjis` to `isMbcs`. `tools/pr_overlap.py` also lists #6044 (test reorganization, which conflicts with `main`) as sharing `libSceCesCs/CMakeLists.txt` without a comparison; it implements none of these functions. ### Tested Windows 11, WinLibs MinGW-w64 GCC 15.2.0, Release, `BUILD_TESTING=ON`. - Table source: every cell of CP949.TXT and CP950.TXT matches both Windows' `MultiByteToWideChar` (code pages 949 and 950) and Python's `cp949` and `cp950` codecs, with no differences. - New `guest_ces_dbcs` and `guest_ces_dbcs_module` tests: - Every two-byte input (65,536 per profile) goes through the three `*ToUtf8` exports. The FNV-1a hash of the results matches values computed independently in Python from the unicode.org files. - Explicit error cases, with outputs left unchanged on failure. - String conversions in both directions. - A full decode-encode round trip through the context: no mismatches for EUC-KR and UHC, and exactly the ten duplicate cells for Big5. - Narrowing one UHC trail range on purpose makes `guest_ces_dbcs` fail; restoring it passes. - `ctest -R "^guest_ces|progress|test_registration"`: 11/11 passed. The full suite was not run. - `tools/check_conventions.py` and `tools/check_test_registration.py` pass. `tools/pr_overlap.py` reports only the #7091 lines and #6044 above. - No console or title was run. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file (none added) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-19 12:23:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T12:23:17Z.


Progress report (158d8ad → dc7be1b)

📈 System libraries: 48.91% (+0.05%, +6 implemented functions)

✅ 6 implemented
Library Name
libSceCesCs sceCesBig5ToUtf8
libSceCesCs sceCesEucKrToUtf8
libSceCesCs sceCesUcsProfileInitBig5Cp950
libSceCesCs sceCesUcsProfileInitEucKr
libSceCesCs sceCesUcsProfileInitUhc
libSceCesCs sceCesUhcToUtf8
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6267114455 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6267114455). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T12:23:17Z. --- <!-- progress-report --> ### Progress report (158d8ad → dc7be1b) 📈 **System libraries**: 48.91% (+0.05%, +6 implemented functions) <details> <summary>✅ 6 implemented</summary> | Library | Name | | - | - | | libSceCesCs | `sceCesBig5ToUtf8` | | libSceCesCs | `sceCesEucKrToUtf8` | | libSceCesCs | `sceCesUcsProfileInitBig5Cp950` | | libSceCesCs | `sceCesUcsProfileInitEucKr` | | libSceCesCs | `sceCesUcsProfileInitUhc` | | libSceCesCs | `sceCesUhcToUtf8` | </details>
github-actions[bot] commented 2026-10-19 12:31:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T12:31:30Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8923 core/libs/prx/libSceCesCs/Export.cpp L10
docs/dev/debt/libSceCesCs.md L14
PR 8967 core/libs/prx/libSceCesCs/Export.cpp L387
docs/dev/debt/libSceCesCs.md L14
PR 8972 core/libs/prx/libSceCesCs/Export.cpp L387
docs/dev/debt/libSceCesCs.md L14
PR 8976 core/libs/prx/libSceCesCs/Export.cpp L10, L154-155, L264, L339, L366, L387
docs/dev/debt/libSceCesCs.md L14
PR 8993 core/libs/prx/libSceCesCs/Export.cpp L10, L154-155, L264, L339, L366, L387
docs/dev/debt/libSceCesCs.md L14

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/prx/libSceCesCs/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6267268441 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6267268441). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T12:31:30Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8923](https://www.github.com/boykopovar/AnyPS5/pull/8923) | `core/libs/prx/libSceCesCs/Export.cpp` [L10](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L10)<br>`docs/dev/debt/libSceCesCs.md` [L14](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/docs/dev/debt/libSceCesCs.md#L14) | | | | [PR 8967](https://www.github.com/boykopovar/AnyPS5/pull/8967) | `core/libs/prx/libSceCesCs/Export.cpp` [L387](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L387)<br>`docs/dev/debt/libSceCesCs.md` [L14](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/docs/dev/debt/libSceCesCs.md#L14) | | | | [PR 8972](https://www.github.com/boykopovar/AnyPS5/pull/8972) | `core/libs/prx/libSceCesCs/Export.cpp` [L387](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L387)<br>`docs/dev/debt/libSceCesCs.md` [L14](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/docs/dev/debt/libSceCesCs.md#L14) | | | | [PR 8976](https://www.github.com/boykopovar/AnyPS5/pull/8976) | `core/libs/prx/libSceCesCs/Export.cpp` [L10](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L10), [L154-155](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L154-L155), [L264](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L264), [L339](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L339), [L366](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L366), [L387](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L387)<br>`docs/dev/debt/libSceCesCs.md` [L14](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/docs/dev/debt/libSceCesCs.md#L14) | | | | [PR 8993](https://www.github.com/boykopovar/AnyPS5/pull/8993) | `core/libs/prx/libSceCesCs/Export.cpp` [L10](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L10), [L154-155](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L154-L155), [L264](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L264), [L339](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L339), [L366](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L366), [L387](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/core/libs/prx/libSceCesCs/Export.cpp#L387)<br>`docs/dev/debt/libSceCesCs.md` [L14](https://github.com/boykopovar/AnyPS5/blob/27fabb6b7d1832209d7f145df747ee94da303b58/docs/dev/debt/libSceCesCs.md#L14) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceCesCs/CMakeLists.txt` |
blawesom commented 2026-10-19 18:45:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T18:45:18Z.


Rebase handoff — rebased onto current main (all commits, authorship unchanged). The Export.cpp guard conflicts resolved to your isMbcs superset guard (main's per-family isEucJp/isSjis/isSbc guards superseded where the union had duplicated both).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; the CesCs tests pass; conventions pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7884
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is d8981141b.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6274651773 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6274651773). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T18:45:18Z. --- **Rebase handoff** — rebased onto current `main` (all commits, authorship unchanged). The `Export.cpp` guard conflicts resolved to your `isMbcs` superset guard (`main`'s per-family `isEucJp/isSjis/isSbc` guards superseded where the union had duplicated both). Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; the CesCs tests pass; conventions pass; **full suite green apart from the four known `main` regressions** (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7884 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `d8981141b`.
blawesom commented 2026-10-19 18:52:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T18:52:23Z.


Correction on the handoff above: the first push had a real bug — my guard resolution replaced main's per-family guards with your isMbcs but dropped main's SJIS dispatch from it, so main's SJIS tests (unioned in) hit the CP949 path and aborted. isMbcs now includes isSjis, and everything passes: guest_ces green, full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), conventions pass. Head is now 2738b54f1.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6274787740 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6274787740). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T18:52:23Z. --- Correction on the handoff above: the first push had a real bug — my guard resolution replaced main's per-family guards with your `isMbcs` but dropped main's SJIS dispatch from it, so main's SJIS tests (unioned in) hit the CP949 path and aborted. `isMbcs` now includes `isSjis`, and everything passes: `guest_ces` green, full suite green apart from the four known `main` regressions (#5444 Mesa, #7584 BDA, #7766, #7784), conventions pass. Head is now `2738b54f1`.
jacob6769 commented 2026-10-20 10:14:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jacob6769 on 2026-10-20T10:14:07Z.


Thanks @blawesom for the rebase handoff and for catching the dropped SJIS dispatch in the guard resolution.

I rebased the branch onto current main (d14a186f4) myself and resolved the guards the same way as your correction: both use isMbcs, which now includes isSjis. Head is f698dbef5. On Windows (WinLibs GCC, Release) all six guest_ces* tests pass, and tools/check_conventions.py is clean.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6288620331 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6288620331). Originally posted by [jacob6769](https://github.com/jacob6769) on 2026-10-20T10:14:07Z. --- Thanks @blawesom for the rebase handoff and for catching the dropped SJIS dispatch in the guard resolution. I rebased the branch onto current `main` (`d14a186f4`) myself and resolved the guards the same way as your correction: both use `isMbcs`, which now includes `isSjis`. Head is `f698dbef5`. On Windows (WinLibs GCC, Release) all six `guest_ces*` tests pass, and `tools/check_conventions.py` is clean.
blawesom commented 2026-10-20 19:18:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-20T19:18:29Z.


Rebase handoff — your f698dbef5 (with the isMbcs guard carrying isSjis from my earlier correction) rebases onto current main (a9cfea22f) cleanly, no conflicts this time.

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; guest_ces and the full CesCs family pass; 1719/1722 — green apart from the three known current-main failures on this stack (#7784 guest-memory, tessellation pending Mesa 26.2.6, image_array_window_past_layer_limit flagged on #6772), none from this PR; conventions pass.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7884
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is b888474b7.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6299227139 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6299227139). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-20T19:18:29Z. --- **Rebase handoff** — your `f698dbef5` (with the `isMbcs` guard carrying `isSjis` from my earlier correction) rebases onto current `main` (`a9cfea22f`) cleanly, no conflicts this time. Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; `guest_ces` and the full CesCs family pass; **1719/1722 — green apart from the three known current-`main` failures on this stack** (#7784 guest-memory, tessellation pending Mesa 26.2.6, `image_array_window_past_layer_limit` flagged on #6772), none from this PR; conventions pass. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7884 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `b888474b7`.
nikowolf123 commented 2026-10-20 22:04:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T22:04:19Z.


The new test only partly covers the Big5 duplicate-cell rule.

GuestCesDbcs.cpp line 176 requires RoundTripMismatches(context) == 10. Each of the ten duplicated characters produces exactly one mismatch, whichever cell the encoder picks, so the count is 10 for any choice. The explicit check on line 174 pins U+2550, U+256D, U+5341 and U+5345. Nothing checks U+255E, U+2561, U+256A, U+256E, U+256F or U+2570.

For example, if BIG5_LAST_CELL is reduced to {0x2550, 0x5341, 0x5345}, then U+255E, U+2561 and U+256A encode to A2A5, A2A7 and A2A6 instead of F9E9, F9EB and F9EA, and guest_ces_dbcs still passes. The current choices are correct. The WCTABLE in Microsoft's bestfit950.txt maps U+255E, U+2561, U+256A, U+256E, U+256F and U+2570 to F9E9, F9EB, F9EA, A2A1, A2A3 and A2A2. The WHATWG index Big5 pointer takes the last cell for the same six characters that are in BIG5_LAST_CELL.

I'd add one line after line 174 to pin the other six. It passes on this head and fails with the reduced list:

RequireString(context, "\xF9\xE9\xF9\xEB\xF9\xEA\xA2\xA1\xA2\xA3\xA2\xA2", "\xE2\x95\x9E\xE2\x95\xA1\xE2\x95\xAA\xE2\x95\xAE\xE2\x95\xAF\xE2\x95\xB0");
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6302777562 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6302777562). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-20T22:04:19Z. --- The new test only partly covers the Big5 duplicate-cell rule. [`GuestCesDbcs.cpp` line 176](https://github.com/boykopovar/AnyPS5/blob/f698dbef51afc25764d9fa21f4824245e53b662a/core/libs/tests/GuestCesDbcs.cpp#L176) requires `RoundTripMismatches(context) == 10`. Each of the ten duplicated characters produces exactly one mismatch, whichever cell the encoder picks, so the count is 10 for any choice. The explicit check on [line 174](https://github.com/boykopovar/AnyPS5/blob/f698dbef51afc25764d9fa21f4824245e53b662a/core/libs/tests/GuestCesDbcs.cpp#L174) pins U+2550, U+256D, U+5341 and U+5345. Nothing checks U+255E, U+2561, U+256A, U+256E, U+256F or U+2570. For example, if [`BIG5_LAST_CELL`](https://github.com/boykopovar/AnyPS5/blob/f698dbef51afc25764d9fa21f4824245e53b662a/core/libs/prx/libSceCesCs/Export.cpp#L160) is reduced to `{0x2550, 0x5341, 0x5345}`, then U+255E, U+2561 and U+256A encode to A2A5, A2A7 and A2A6 instead of F9E9, F9EB and F9EA, and `guest_ces_dbcs` still passes. The current choices are correct. The WCTABLE in Microsoft's [bestfit950.txt](https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit950.txt) maps U+255E, U+2561, U+256A, U+256E, U+256F and U+2570 to F9E9, F9EB, F9EA, A2A1, A2A3 and A2A2. The [WHATWG index Big5 pointer](https://encoding.spec.whatwg.org/#index-big5-pointer) takes the last cell for the same six characters that are in `BIG5_LAST_CELL`. I'd add one line after line 174 to pin the other six. It passes on this head and fails with the reduced list: ```cpp RequireString(context, "\xF9\xE9\xF9\xEB\xF9\xEA\xA2\xA1\xA2\xA3\xA2\xA2", "\xE2\x95\x9E\xE2\x95\xA1\xE2\x95\xAA\xE2\x95\xAE\xE2\x95\xAF\xE2\x95\xB0"); ```
adriadam10 commented 2026-10-21 11:39:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T11:39:47Z.


Checked the CP949/CP950 decoding ranges, the Big5 duplicate-cell encoding, argument-check order and unchanged outputs on failure, and the table hashes in guest_ces_dbcs. Thanks to @nikowolf123 for spotting that the Big5 test only pinned four of the ten duplicate cells; I added the line pinning U+255E, U+2561, U+256A, U+256E, U+256F and U+2570 (F9E9, F9EB, F9EA, A2A1, A2A3, A2A2) and resolved the debt-file adjacency conflict. CesCs tests pass; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314998292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7884#issuecomment-6314998292). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T11:39:47Z. --- Checked the CP949/CP950 decoding ranges, the Big5 duplicate-cell encoding, argument-check order and unchanged outputs on failure, and the table hashes in `guest_ces_dbcs`. Thanks to @nikowolf123 for spotting that the Big5 test only pinned four of the ten duplicate cells; I added the line pinning U+255E, U+2561, U+256A, U+256E, U+256F and U+2570 (F9E9, F9EB, F9EA, A2A1, A2A3, A2A2) and resolved the debt-file adjacency conflict. CesCs tests pass; merged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7884
No description provided.