feat(libSceIcu): implement Unicode decimal digit classification #16250
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16250"
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 nabil88 on 2026-11-05T23:54:54Z.
What
u_charDigitValue,u_digit,u_isdigitandu_isxdigitin libSceIcu threw throughNotImplemented_nid_no_patch. They now follow ICU 78.1uchar.cppover the Unicode 17.0Ndranges (72 ranges, 770 code points) instead of ICU's property data.u_digitaccepts radices 2 to 36 and ASCII/fullwidth letters; other radices return -1. The console behavior is not verified.Tested
Windows, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON:ctest --test-dir build-full -R "guest_icu_character"passesguest_icu_character, including ASCII, Arabic-Indic, extended Arabic-Indic, fullwidth, Myanmar and mathematical-digit spot checks, theu_isxdigitASCII/fullwidth matrix and theu_digitradix/letter cases.python tools/check_conventions.py --base origin/mainpasses.pr_overlapreports no overlap with any open pull request.Not tested on a console; the classification follows the public Unicode/ICU data, unverified against the console.
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 ahmadmuj on 2026-11-06T07:18:13Z.
Review: COMMENTED
Checked head
c0c6e77bfe, PR base399292ce5c. This review covers u_isdigit and u_isxdigit only.On Linux, I built the actual libSceIcu module with main
ea443a1546integrated locally. The classification bodies, helper and table remain byte-identical to this head. Both character fixtures pass. The local resolution combines Character.cpp/header additions, removes replaced stubs, and gives main's fixture a separate registration. The contributor branch still needs conflict resolution.A separate probe parses category fields from pinned UnicodeData.txt, including First/Last records. It applies the ASCII/fullwidth hex rules from uchar.cpp. All code points through U+10FFFF and eight invalid int32 controls match: 2,228,240 exact 0/1 comparisons, zero mismatches. There are 770 decimal and 794 hex positives. Loader bindings confirm both calls use the built module.
A probe-only boundary mutation at U+0030 produces the expected mismatch. No classification issue found against that source. Numeric-value exports and console compatibility are outside this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T04:40:12Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: ensure the four implemented functions have the correct public export names and are reachable through the library’s export registration.
What I ran
Reviewed head
c0c6e77bfefaf83aedc4d8f8ca191d11a1b4617dusing the prepared diff and the pinned repository reader,repo_read.py. No build or tests were run.Results
Findings
Blocking
u_charDigitValue_nid_postfix,u_digit_nid_postfix,u_isdigit_nid_postfix, andu_isxdigit_nid_postfixas plain C-linkage symbols. The diff removes the old throwing implementations fromExport.cpp, but does not addAPS5_EXPORTregistrations for the new implementations. The nearby unknown export in that file explicitly usesAPS5_EXPORT, while these four functions have no corresponding registration in the inspected changed code. As a result, calls through the library’s public ICU export names will not be routed to these implementations. Register the four functions with the correct export names/NIDs. Evidence:core/libs/prx/libSceIcu/Character.cpp:48andcore/libs/prx/libSceIcu/Character.cpp:67.Non-blocking
None.
Not verified
manifest.json:core/libs/prx/libSceIcu/CMakeLists.txt,core/libs/prx/libSceIcu/Character.cpp,core/libs/prx/libSceIcu/Character.hpp,core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/Identified.hpp,core/libs/tests/GuestIcuCharacter.cpp, anddocs/dev/debt/libSceIcu.md. No changed files were excluded;files.jsonwas unavailable through the reader.To get this to a good state
Register the four implementations under their public export names/NIDs, then rerun the character test and convention check on the updated head.
Pull request closed