Repository navigation
feat(libSceCesCs): convert GBK and EUC-CN through the CP936 table - #8976
Conversation
Progress report (b3e42bd → cd4bfc3)📈 System libraries: 46.74% (+0.48%, +56 implemented functions) ✅ 56 implemented
|
|
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.
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.
|
|
Windows run of a4049f3 merged cleanly onto Built |
|
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
|
…ring conversions
Implement sceCesSbcTo{Ucs2,Utf16,Utf32}* and their inverses, and the
UTF-16 and UTF-32 MBCS string conversions and length queries, on the
existing single-byte, CP932 and CP51932 profiles.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the GBK (CP936) and EUC-CN profiles, their scalar conversions to and from UTF-8, UTF-16, UTF-32 and UCS-2, and accept both profiles in the MBCS string conversions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a4049f3 to
f974e91
Compare
|
Linux run of f974e91 merged onto Environment: Ubuntu 24.04 x86-64 container under Rosetta on Apple Silicon (Colima), GCC 13, Results: the full build has no errors. Not run: the static CI configuration, native x86-64 hardware, GPU tests, a title. AI-assisted (Claude Code). |
|
Windows run of f974e91, the update since my earlier run, merged onto Built |
|
Updated for #8972's Linux run of cd4bfc3, same container as on #8972 (GCC 13, RelWithDebInfo with ASan): no build errors in AnyPS5 code (only the known AI-assisted: yes |
What
Implements 34 libSceCesCs exports that were pending stubs:
sceCesUcsProfileInitGbkCp936,sceCesUcsProfileInitEucCnGb2312sceCesGbTo{Ucs2,Utf8,Utf16,Utf16be,Utf16le,Utf32,Utf32be,Utf32le}andsceCesEucCnTo{…}sceCes{Ucs2,Utf8,Utf16,Utf16be,Utf16le,Utf32,Utf32be,Utf32le}ToGband…ToEucCnThe new
Cp936.hppholds the 21,791 double-byte cells of Microsoft's CP936.TXT, with single-byte0x80mapped to U+20AC as that file does. The GB 2312 mapping file is no longer published by unicode.org, so the EUC-CN profile uses the same table restricted to0xA1-0xFElead and trail bytes; the differences this implies (GBK cells inside that range, CP936 forms of0xA1A4and0xA1AA) are recorded indocs/dev/debt/libSceCesCs.md. The MBCS string conversions (sceCesUtf8StrToMbcsStrand the others) accept both profiles. The scalar helpers from #8967 are renamed from*Japaneseto*Profiledbecause they now serve both languages. Signatures follow the Orbital type database. Errors follow the existing converters and are not console measurements. User-defined areas, GB 18030 four-byte forms andsceCesGbUcsProfileSet*stay unimplemented. libSceCesCs goes from 86 to 120 of 284 intools/progress.py.This branch is stacked on #8972 (itself on #8967); only the top commit is new.
Tested
macOS 27 (Apple silicon), clang, C++20: libSceCesCs sources and tests compiled outside CMake, since the full build does not run on macOS. Passing:
guest_ces_chinese: errors, byte orders, a GBK and EUC-CN round trip of every encodable BMP code point, and GBK strings through an MBCS context;guest_ces,guest_ces_unicode,guest_ces_japaneseandguest_ces_wide, with no regressions.Cross-check:
sceCesGbToUcs2on all 32,766 lead/trail pairs matches Python'sgbkcodec (24,066 identical decodes; all other pairs fail in both).The CMake/ctest build on Linux and Windows was not run locally.
check_conventions.pyis clean.pr_overlap.pylists only shared files with #8923, #7884 and #6044, none implementing these functions; #7884 edits the same MBCS dispatch inExport.cpp, so whichever lands second needs a rebase. No title tested.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)🤖 Generated with Claude Code