Repository navigation
feat(libSceCesCs): add the Windows-1253, 1255 and 1257 profiles - #9912
SkillzTech1 wants to merge 2 commits into
Conversation
sceCesRefersUcsProfile threw for every code page except 1250, 1251 and 1252. Twenty-seven more now return a profile that sceCesSbcToUtf8, sceCesUtf8ToSbc and the MBCS context conversions accept: ISO 8859-1, -2, -4, -5, -9, -10, -13, -14, -15 and -16, code pages 437, 737, 775, 850, 852, 855, 860, 861, 862, 863, 865 and 866, KOI8-R, KOI8-U and Windows 1254, 1256 and 1258. SingleByte.hpp holds the high half of each table, taken from the public mapping files at unicode.org: ISO8859, Microsoft's PC tables, VENDORS/MISC for KOI8 and Microsoft's best-fit tables for 1254, 1256 and 1258, the same source and derivation as the existing Cp1250 table, whose high half equals bestfit1250's byte table. Bytes 0x00-0x7F are unchanged in all of them, and every table maps its 256 bytes to 256 distinct BMP characters. The three existing profiles keep their tables; one lookup now serves them all. Profiles whose public table leaves bytes undefined (ISO 8859-3, -6, -7, -8, -11, code pages 857, 864, 869), maps bytes to private use (874, 1253, 1255, 1257) or has no public table here still throw. guest_ces checks that each new profile is a distinct, stable pointer, four bytes per table against the source, a round trip of every byte through sceCesSbcToUtf8 and sceCesUtf8ToSbc, UNASSIGNED_CODE for a character outside the table, and a KOI8-R string through an MBCS context in both directions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sceCesRefersUcsProfileCp1253, sceCesRefersUcsProfileCp1255 and sceCesRefersUcsProfileCp1257 return single-byte profiles with the MBTABLE of Microsoft's bestfit1253.txt, bestfit1255.txt and bestfit1257.txt, as the other Windows profiles do. Their unassigned bytes map to the Private Use Area code points those tables give. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
|
I checked the three added 128-entry high-byte tables against the linked Microsoft |
|
Hi, I’m the author of boykopovar/AnyPS5#10214, which adds the code page 858 profile in libSceCesCs. A reviewer asked the PRs touching the CES files to agree on a landing order. This PR and boykopovar/AnyPS5#10214 both append to the end of the table in SingleByte.hpp, to the profile list in GuestCes.cpp and to the CES debt file. All three are keep-both overlaps, and no export is shared. This branch also conflicts with current main already (docs/dev/debt/libSceCesCs.md). My proposal is boykopovar/AnyPS5#10056, then boykopovar/AnyPS5#10214, then this PR refreshed on top. If you would rather land first, tell me and I’ll rebase boykopovar/AnyPS5#10214 onto yours. |
…ebt/libSceCesCs.md)
|
I checked the three profiles against firmware 13.42's own On 13.42 these bytes are unassigned: decoding them answers
Every other byte matches this head's tables (Cp1253 239, Cp1255 233, Cp1257 244 of 256 bytes). Each profile encodes exactly the scalars it decodes, back to the same byte. The UTF-8 and UTF-32 decoders give the same result on every byte. Main's Cp1250-1252 already answer In Three runs, identical output. Not checked: the MBCS context conversions with these profiles. |
|
@SkillzTech1 @BunnyFl The reported 13.42 results differ from the current tables and tests for the private-use bytes, Cp1255 0xCA and the listed C1 positions. Could you reconcile all of those cases, including reverse encoding and the all-bytes round-trip test? Please attach the text output and probe details for the reported run so the mapping and error results can be checked. The module hash is useful provenance, but this still needs evidence we can inspect. |
|
@oneandonlydean the probe source, the text output and the comparison with this head are in https://gist.github.com/BunnyFl/ea10c37840bd46a27caea4a84b6d14a5:
For the three new profiles, the reverse direction is the exact inverse of decoding. The scalars that encode are those the decoder returns, back to the same byte, and nothing else encodes (Cp1253 239, Cp1255 233, Cp1257 244 scalars). Every other scalar up to 0x10FFFF answers |
What
Builds on #8923, which adds 27 single-byte profiles and leaves out the Windows code pages whose best-fit tables map bytes to private use. This adds those three:
sceCesRefersUcsProfileCp1253,sceCesRefersUcsProfileCp1255andsceCesRefersUcsProfileCp1257now return a profile instead of throwing.MBTABLEof Microsoft's bestfit1253.txt, bestfit1255.txt and bestfit1257.txt, the same source asCP1250_HIGH,CP1251_HIGHand feat(libSceCesCs): add 27 single-byte code page profiles #8923's 1254, 1256 and 1258. They are three more entries in feat(libSceCesCs): add 27 single-byte code page profiles #8923'sSingleByte.hpp, used through itssbcHighTable; no other code changes.0xAA,0xD2,0xFF(U+F8F9-U+F8FB), Cp12550xD9-0xDF,0xFB,0xFC,0xFF(U+F88D-U+F896) and Cp12570xA1,0xA5(U+F8FC, U+F8FD). This is what Windows' own conversion does for these code pages. Every other byte, including Cp12550xCA(U+05BA), is a regular character or a C1 control as in the other Windows tables.sceCesUtf8ToSbcand MBCS output are unambiguous.mainonce feat(libSceCesCs): add 27 single-byte code page profiles #8923 merges.docs/dev/debt/libSceCesCs.mdsays so, now for 30 profiles. The pending-exports count drops from 222 to 219.Tested
Windows 11 Pro, MSYS2 UCRT64 GCC 16.1.0, Release, this branch merged into
main9e568a3 (#8923's base no longer configures with this GCC, which needs the SEH support added since).ctest -R '^guest_ces': 6/6 pass (guest_ces,guest_ces_module,guest_ces_dbcs,guest_ces_dbcs_module,guest_ces_unicode,guest_ces_unicode_module).CheckSingleByteProfilescovers the three new profiles: distinct stable pointers, the 1-255 round trip, and four sample bytes each plus two of the private use bytes and Cp12550xCA.libSceCesCs.prxdecoded all 256 bytes and encoded all BMP scalars for 1250-1258 and compared them with Python 3.13'scp125xcodecs: 0 mismatches in both directions; the only bytes not compared are those Python leaves undefined, listed above. Each profile encodes exactly 256 scalars.python3 tools/check_conventions.py --base origin/mainpasses.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