feat(libSceIcu): implement the ICU locale, string hash and data hook exports #23859
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23859"
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 larpsahur333 on 2026-11-19T19:52:20Z.
What
Ten
libSceIcuexports that answeredNotImplemented_nid_no_patchnow call ICU 78.1 through its C entry points:uloc_countAvailable,uloc_getAvailableuloc_getNameuloc_addLikelySubtags,uloc_minimizeSubtagsustr_hashUCharsN,ustr_hashCharsN,ustr_hashICharsNudata_setCommonData,udata_setFileAccessThis is the part of the ICU work that #18400 (
ucnv_*) and #18208 (u_charName/u_charFromName) do not cover, as the review asked. Every other stub this branch touched is back byte for byte: the fourteenubrk_*entries,ubrk_setUText,ucnv_fromUnicodeanduloc_getCharacterOrientation.ures_open,ures_getByKeyandures_getStringByKeyare not touched: a host ICU bundle does not match the ICU 68 model the existingures_close/ures_getUintuse.RecoveredInventory.cpp,RecoveredInventory.hppandIdentified.hppare unchanged frommain.cmake/Icu.cmakegainscommon/locavailable.cppandcommon/errorcode.cpp, because the locale availability entry points live there and the vendored ICU build did not compile them.tools/progress.py:libraries 17526/39558 (44.3%)before,17536/39550 (44.34%)after;libSceIcualone285/2763 (10.31%)to291/2759 (10.55%).Tested
Windows 11 x86-64, MinGW-w64 GCC 15.2.0 (
x86_64-ucrt-posix-seh, WinLibs15.2.0posix-14.0.0-ucrt-r7), CMake 3.29.2, Ninja.guest_icu_availability(new,core/libs/prx/libSceIcu/tests/Availability.cpp) passes. It checksuloc_countAvailableanduloc_getAvailable(0), canonicalizesEN-ustoen_USand checks the required length plus the overflow status for a four-byte buffer, hashesabcand the empty string with all three hash functions (136518and0, and the case-insensitive one foldingABCto the same value), runs the subtag functions accepting either the result or the missing-data status ICU reports withouticudt, and callsudata_setFileAccess. The whole ICU suite passes on that tree:ctest -R "^guest_icu"reports100% tests passed, 0 tests failed out of 77.python core/libs/tests/test_public_headers.py --compiler g++:413 libraries, 34727 exports: unique declarations and umbrella coverage verified.python3 tools/debt_fold.py --checkandpython3 tools/check_conventions.py --base <base> --head <head>pass.Not tested: no PS5 was involved, so the console's answers are unmeasured; without ICU data the subtag functions only report
U_MISSING_RESOURCE_ERROR, and a guest-suppliedudata_setCommonDatablob is the only path to real data.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 repositoryImported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T20:08:02Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
dc985a03e8:tools/check_conventions.pypassed.guest_icu_availability_testsbuilt cleanly.guest_icu_availability):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/Identified.hpp,core/libs/prx/libSceIcu/RecoveredInventory.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hpp,core/libs/prx/libSceIcu/Availability.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T20:41:53Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
2c60e60f2e:tools/check_conventions.pypassed.guest_icu_availability_testsbuilt cleanly.guest_icu_availability):core/libs/prx/libSceIcu/Export.cpp,core/libs/prx/libSceIcu/include/InventoryExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hpp,core/libs/prx/libSceIcu/Availability.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T21:11:47Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
8f6ac9394a:tools/check_conventions.pypassed.guest_icu_availability_testsbuilt cleanly.guest_icu_availability):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.hpp,core/libs/prx/libSceIcu/Availability.cpp,core/libs/prx/libSceIcu/StringHash.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me