feat(libSceIcu): implement Unicode script properties #18331
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18331"
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 fogydes on 2026-11-11T09:20:03Z.
What
Calls to ten Unicode script-property exports currently throw immediately. Implement their ICU C behavior with typed System V adapters: script lookup and membership, long/short names, extension lists, usage/direction/case/line-break metadata, and UTF-16 sample strings. Extension queries copy the fitting prefix on overflow; sample queries never copy an incomplete surrogate pair. Native enum arrays and status values are staged without aliasing guest
int32_tbuffers. Builduscript_props.cppon every host instead of Windows only.This slice comes from the current ICU debt and the PS5 3.20 export inventory. Behavior and signatures follow existing submodule ICU 78.1 at
049e0d6a420629ac7db77256987d083a563287b5: uchar.cpp, propname.cpp, uscript_props.cpp, andunicode/uscript.h. The latter's prose saysgetScriptreturns 0 for invalid code points, while the implementation returns -1; this follows the implementation. No new dependency or shipped module is added.progress.py --module libSceIcu: implementedexport_gap.pyagainst the cited 661-NID table: missingTen unconditional stubs gain behavior. The tracker still classifies the three status/buffer APIs as TODO because unusable guest memory deliberately calls
NotImplemented_nid_no_patch; those guards are retained. Presence coverage is unchanged because all ten NIDs already resolved as stubs.uscript_getCoderemains unimplemented because locale resources are unavailable.Console ABI, Unicode-data version and title compatibility are unverified: the implementation uses ICU 78.1 / Unicode 17.0, while the legacy inventory has ICU 68-era names. The debt entry records this, pointer-safety behavior, and the header/source disagreement. No console or title-unblock claim.
Tested
libSceIcu, runtime dependencies and all 35 ICU guest test executables;ctest --test-dir build-full -R '^guest_icu_' --output-on-failure -j 6: 35/35 passed. New tests check code-point and script boundaries, Unicode extension sets, invalid inputs, warning/error propagation, partial/exact buffers, supplementary samples and untouched sentinels. Expected extension sets come from pinnedppucd.txt.nid_patcher, regenerated the libc preserve list, patched the produced PE library and verified all ten script NIDs in its export table.python core/libs/tests/test_public_headers.py --audit-only: 407 libraries, 33941 exports, unique declarations and umbrella coverage verified.python tools/check_conventions.py --base origin/mainandgit diff --check: passed.python tools/pr_overlap.py --branch feat/libSceIcu-script-properties: exit 2 because 19 other PRs conflict with its current base. Completed the required manual comparison of all 19 plus the 3 confirmed line-overlap PRs (22 exact heads). None implements these ten functions or supplies a semantic prerequisite. #14340/#14443 relocate unchanged throwing script stubs and retain textual integration conflicts. #16872 shares a CMake insertion point; #16971/#17646 share debt edits. Other stale inventory/debt rewrites can require rebasing. This is not a claim that the automated overlap report is clean.guest_icu_script_tests;ctest -R '^guest_icu_script$' --output-on-failure: 1/1 passed. The unchanged revision-metadata CMake script ran via Windows Git because the native Git submodule scan over/mnt/dstalled compilation; the compiler, linker and test ran on Linux, and the temporary generated-build recipe was restored afterward.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 PrivacyOnion on 2026-11-11T15:55:34Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
64dadcfa9b:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_script_tests,libSceIcubuilt cleanly.guest_icu_script):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me