feat(libSceIcu): embed emoji and layout property data #22036

Merged
frankea merged 3 commits from upstream-pr/22036 into main 2026-11-17 06:30:01 +00:00
frankea commented 2026-11-17 02:51:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-11-17T02:51:52Z.


What

Implements five libSceIcu exports whose only NotImplemented_nid_no_patch was a data-file guard: u_hasBinaryProperty, u_getIntPropertyValue, u_getIntPropertyMaxValue, u_getIntPropertyMap (all in Properties.cpp) and unorm_compare (Normalization.cpp). It also removes the same guard from u_getBinaryPropertySet (Set.cpp), which stays a stub for progress because of its unreadable-error throw.

This PR is stacked on #19413 and contains its commit, rebased onto main 939d3630ed without changes. #19413 replaces ICU stubdata with a U_ICUDATA_ENTRY_POINT built from the pinned data/in/nfkc.nrm and nfkc_cf.nrm. That covers the UPROPS_SRC_NFKC and UPROPS_SRC_NFKC_CF sources. The new commit adds the two data files the remaining guarded sources need, from the ICU submodule at 049e0d6a:

  • uemoji.icu (14386 bytes) for UPROPS_SRC_EMOJI. emojiprops.cpp L84 opens it with udata_openChoice(nullptr, "icu", "uemoji", ...).
  • ulayout.icu (14448 bytes) for UPROPS_SRC_INPC, UPROPS_SRC_INSC and UPROPS_SRC_VO. ulayout_load opens it in uprops.cpp L97-L141, and the getters and layoutGetMaxValue read it at L683-L707.

cmake/Icu.cmake now takes a list of file names (nfkc.nrm nfkc_cf.nrm uemoji.icu ulayout.icu) instead of .nrm stems. It derives the array name with string(MAKE_C_IDENTIFIER) and passes the entry count to IcuNormalizationData.cpp.in, which used a fixed 2. The list stays sorted by name, because pointerTOCLookupFn binary-searches the TOC.

With all six data sources present, FromDataFile, LayoutProperty and Icu::PropertyNeedsData are removed. The exports are plain forwards to u_hasBinaryProperty L486-L497, u_getIntPropertyValue L756-L770 and u_getIntPropertyMaxValue L777-L788, and to u_getIntPropertyMap and u_getBinaryPropertySet. The unorm_compare guard threw only on U_MISSING_RESOURCE_ERROR or U_FILE_ACCESS_ERROR. unormcmp.cpp L561-L638 only uses getNFDInstance, getFCDInstance and uniset_getUnicode32Instance (L602-L611), then unorm_cmpEquivFold, which uses Normalizer2Factory::getNFCImpl (L178-L181). These use the compiled-in NFC data and property tables, so that status cannot occur and the guard was dead code. Its existing tests in tests/Normalization.cpp already cover it, so unorm_compare has no new test.

One guard stays, with a new reason. For Basic_Emoji through RGI_Emoji (65-71), ICU adds emoji sequences (strings) to the set (characterproperties.cpp L291-L309). The guest USet in Set.cpp holds only code point ranges, so for those properties u_getBinaryPropertySet throws NotImplemented_nid_no_patch("u_getBinaryPropertySet: property of strings") instead of returning an incomplete set. u_hasBinaryProperty for those properties takes a single code point and is forwarded.

#16971, and the copies of its data pipeline in #19720, #19628, #19645, #19635 and #19670, also replace stubdata with a full icudt78l build that includes these files. If #16971 lands first, the guard removal here still applies and the cmake part becomes redundant.

Values follow Unicode 17 from the pinned ICU 78.1. The console's ICU 68 has Unicode 13, so a code point assigned or changed since then can differ. Properties 65-71 (Basic_Emoji through RGI_Emoji) first appeared in ICU 70; the console's UCHAR_BINARY_LIMIT is 65, so it answers false for them, while this branch forwards them like main's other post-68 properties. Not compared with a console.

Debt: the fragment changes the Binary property sets and u_getIntPropertyMap entries. The Character property entry already has a pending change in main's feat-icu-null-locale-default.md, and tools/debt_fold.py --check rejects two fragments that change one entry. The new text therefore goes into that fragment: the data-file paragraph is replaced and its null-locale case mapping text is kept. #19413's Normalization change is still accurate and is not touched.

Progress (python3 tools/progress.py --module libSceIcu): main 939d3630ed 254/2762, #19413 rebased 258/2762, this branch 263/2762. The five new exports are u_getIntPropertyMap, u_getIntPropertyMaxValue, u_getIntPropertyValue, u_hasBinaryProperty and unorm_compare.

Tested

macOS 27.0.1 on Apple silicon, x86_64 Release build under Rosetta (Ninja, AppleClang). Not run on Linux or Windows, and not on a console.

  • guest_icu_properties: new TestDataFileProperties covers:
    • u_hasBinaryProperty for Emoji, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, Emoji_Component, Extended_Pictographic, Basic_Emoji, RGI_Emoji and RGI_Emoji_Flag_Sequence on single code points, and for Changes_When_NFKC_Casefolded;
    • u_getIntPropertyValue for Emoji, NFKC_QC, InPC, InSC and vo (U+093F Left and Vowel_Dependent, U+0915 NA and Consonant, U+4E00 Upright, U+3001 Transformed_Upright, A Rotated);
    • u_getIntPropertyMaxValue for InPC 15, InSC 36 and vo 3;
    • u_getIntPropertyMap for InSC, vo and NFKC_QC.
  • guest_icu_set: new DataFilePropertySets covers the Emoji, Extended_Pictographic and Changes_When_NFKC_Casefolded sets.
  • ctest -R icu: 59 of 59 passed.
  • Control 1, with the tests on #19413 alone (guards in place): guest_icu_properties and guest_icu_set abort, with u_hasBinaryProperty: property from a data file not implemented and u_getBinaryPropertySet_nid_postfix not implemented.
  • Control 2, with the guards removed but without the two data files: both abort on a wrong value (failed: u_hasBinaryProperty(Emoji)). ICU then returns false and 0 without throwing, so the files are needed, not only the guard removal.
  • tools/check_conventions.py --base origin/main passed. tools/debt_fold.py --check passes for libSceIcu; it still reports main's pre-existing libSceLibreSsl3 fragment pair.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #19413
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5349593330 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22036). Originally posted by [frankea](https://github.com/frankea) on 2026-11-17T02:51:52Z. --- ### What Implements five libSceIcu exports whose only `NotImplemented_nid_no_patch` was a data-file guard: `u_hasBinaryProperty`, `u_getIntPropertyValue`, `u_getIntPropertyMaxValue`, `u_getIntPropertyMap` (all in `Properties.cpp`) and `unorm_compare` (`Normalization.cpp`). It also removes the same guard from `u_getBinaryPropertySet` (`Set.cpp`), which stays a stub for progress because of its unreadable-error throw. This PR is stacked on #19413 and contains its commit, rebased onto `main` 939d3630ed3 without changes. #19413 replaces ICU stubdata with a `U_ICUDATA_ENTRY_POINT` built from the pinned `data/in/nfkc.nrm` and `nfkc_cf.nrm`. That covers the `UPROPS_SRC_NFKC` and `UPROPS_SRC_NFKC_CF` sources. The new commit adds the two data files the remaining guarded sources need, from the ICU submodule at [049e0d6a](https://github.com/unicode-org/icu/tree/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/data/in): - `uemoji.icu` (14386 bytes) for `UPROPS_SRC_EMOJI`. [emojiprops.cpp L84](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/emojiprops.cpp#L84) opens it with `udata_openChoice(nullptr, "icu", "uemoji", ...)`. - `ulayout.icu` (14448 bytes) for `UPROPS_SRC_INPC`, `UPROPS_SRC_INSC` and `UPROPS_SRC_VO`. `ulayout_load` opens it in [uprops.cpp L97-L141](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/uprops.cpp#L97-L141), and the getters and `layoutGetMaxValue` read it at [L683-L707](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/uprops.cpp#L683-L707). `cmake/Icu.cmake` now takes a list of file names (`nfkc.nrm nfkc_cf.nrm uemoji.icu ulayout.icu`) instead of `.nrm` stems. It derives the array name with `string(MAKE_C_IDENTIFIER)` and passes the entry count to `IcuNormalizationData.cpp.in`, which used a fixed 2. The list stays sorted by name, because [`pointerTOCLookupFn`](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/ucmndata.cpp#L277-L309) binary-searches the TOC. With all six data sources present, `FromDataFile`, `LayoutProperty` and `Icu::PropertyNeedsData` are removed. The exports are plain forwards to [`u_hasBinaryProperty` L486-L497, `u_getIntPropertyValue` L756-L770 and `u_getIntPropertyMaxValue` L777-L788](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/uprops.cpp#L486-L788), and to [`u_getIntPropertyMap` and `u_getBinaryPropertySet`](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/characterproperties.cpp#L412-L431). The `unorm_compare` guard threw only on `U_MISSING_RESOURCE_ERROR` or `U_FILE_ACCESS_ERROR`. [unormcmp.cpp L561-L638](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/unormcmp.cpp#L561-L638) only uses `getNFDInstance`, `getFCDInstance` and `uniset_getUnicode32Instance` (L602-L611), then `unorm_cmpEquivFold`, which uses `Normalizer2Factory::getNFCImpl` ([L178-L181](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/unormcmp.cpp#L178-L181)). These use the compiled-in NFC data and property tables, so that status cannot occur and the guard was dead code. Its existing tests in `tests/Normalization.cpp` already cover it, so `unorm_compare` has no new test. One guard stays, with a new reason. For Basic_Emoji through RGI_Emoji (65-71), ICU adds emoji sequences (strings) to the set ([characterproperties.cpp L291-L309](https://github.com/unicode-org/icu/blob/049e0d6a420629ac7db77256987d083a563287b5/icu4c/source/common/characterproperties.cpp#L291-L309)). The guest `USet` in `Set.cpp` holds only code point ranges, so for those properties `u_getBinaryPropertySet` throws `NotImplemented_nid_no_patch("u_getBinaryPropertySet: property of strings")` instead of returning an incomplete set. `u_hasBinaryProperty` for those properties takes a single code point and is forwarded. #16971, and the copies of its data pipeline in #19720, #19628, #19645, #19635 and #19670, also replace stubdata with a full `icudt78l` build that includes these files. If #16971 lands first, the guard removal here still applies and the `cmake` part becomes redundant. Values follow Unicode 17 from the pinned ICU 78.1. The console's ICU 68 has Unicode 13, so a code point assigned or changed since then can differ. Properties 65-71 (Basic_Emoji through RGI_Emoji) first appeared in ICU 70; the console's `UCHAR_BINARY_LIMIT` is 65, so it answers false for them, while this branch forwards them like main's other post-68 properties. Not compared with a console. Debt: the fragment changes the `Binary property sets` and `u_getIntPropertyMap` entries. The `Character property` entry already has a pending change in `main`'s `feat-icu-null-locale-default.md`, and `tools/debt_fold.py --check` rejects two fragments that change one entry. The new text therefore goes into that fragment: the data-file paragraph is replaced and its null-locale case mapping text is kept. #19413's `Normalization` change is still accurate and is not touched. **Progress** (`python3 tools/progress.py --module libSceIcu`): `main` 939d3630ed3 254/2762, #19413 rebased 258/2762, this branch 263/2762. The five new exports are `u_getIntPropertyMap`, `u_getIntPropertyMaxValue`, `u_getIntPropertyValue`, `u_hasBinaryProperty` and `unorm_compare`. ### Tested macOS 27.0.1 on Apple silicon, x86_64 Release build under Rosetta (Ninja, AppleClang). Not run on Linux or Windows, and not on a console. - `guest_icu_properties`: new `TestDataFileProperties` covers: - `u_hasBinaryProperty` for Emoji, Emoji_Presentation, Emoji_Modifier, Emoji_Modifier_Base, Emoji_Component, Extended_Pictographic, Basic_Emoji, RGI_Emoji and RGI_Emoji_Flag_Sequence on single code points, and for Changes_When_NFKC_Casefolded; - `u_getIntPropertyValue` for Emoji, NFKC_QC, InPC, InSC and vo (U+093F Left and Vowel_Dependent, U+0915 NA and Consonant, U+4E00 Upright, U+3001 Transformed_Upright, A Rotated); - `u_getIntPropertyMaxValue` for InPC 15, InSC 36 and vo 3; - `u_getIntPropertyMap` for InSC, vo and NFKC_QC. - `guest_icu_set`: new `DataFilePropertySets` covers the Emoji, Extended_Pictographic and Changes_When_NFKC_Casefolded sets. - `ctest -R icu`: 59 of 59 passed. - Control 1, with the tests on #19413 alone (guards in place): `guest_icu_properties` and `guest_icu_set` abort, with `u_hasBinaryProperty: property from a data file not implemented` and `u_getBinaryPropertySet_nid_postfix not implemented`. - Control 2, with the guards removed but without the two data files: both abort on a wrong value (`failed: u_hasBinaryProperty(Emoji)`). ICU then returns false and 0 without throwing, so the files are needed, not only the guard removal. - `tools/check_conventions.py --base origin/main` passed. `tools/debt_fold.py --check` passes for libSceIcu; it still reports `main`'s pre-existing libSceLibreSsl3 fragment pair. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #19413 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code) AI-assisted: yes (Claude Code)
PrivacyOnion commented 2026-11-17 02:57:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T02:57:47Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against a5182dc50d:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_icu_normalization_tests, guest_icu_properties_tests, guest_icu_set_tests built cleanly.
  • CTest (guest_icu_set, guest_icu_properties, guest_icu_normalization):
    1/3 Test #3712: guest_icu_properties .............   Passed    0.05 sec
    2/3 Test #3722: guest_icu_normalization ..........   Passed    0.03 sec
    3/3 Test #3696: guest_icu_set ....................   Passed    0.11 sec
    100% tests passed, 0 tests failed out of 3
    
  • Negative control: with core/libs/prx/libSceIcu/Export.cpp, core/libs/prx/libSceIcu/Identified.hpp, core/libs/prx/libSceIcu/LegacyExports.cpp, core/libs/prx/libSceIcu/Normalization.cpp, core/libs/prx/libSceIcu/Normalization.hpp, core/libs/prx/libSceIcu/Properties.cpp, core/libs/prx/libSceIcu/Properties.hpp, core/libs/prx/libSceIcu/Set.cpp, core/libs/prx/libSceIcu/include/InventoryExports.hpp, core/libs/prx/libSceIcu/include/LegacyExports.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified CMakeLists/Icu.cmake embed generation logic: data files are correctly read as hex, formatted into aligned C++ byte arrays, and registered in the CommonData table with appropriate UDataInfo headers and endianness checks
    • Verified unorm2_getNFKCInstance, unorm2_getNFKDInstance, unorm2_getNFKCCasefoldInstance_nid_postfix, and u_getFC_NFKC_Closure_nid_postfix error handling and Status conversion in core/libs/prx/libSceIcu/Normalization.cpp
    • Verified property query exports (u_hasBinaryProperty_nid_postfix, u_getIntPropertyValue_nid_postfix, u_getIntPropertyMaxValue_nid_postfix, u_getIntPropertyMap_nid_postfix) in core/libs/prx/libSceIcu/Properties.cpp with removed data file guards matching embedded data availability
    • Verified USet boundary and error handling in core/libs/prx/libSceIcu/Set.cpp where string emoji properties (UCHAR_BASIC_EMOJI..UCHAR_RGI_EMOJI) correctly throw NotImplemented_nid_no_patch
    • Verified AGENTS.md compliance, including technical debt fragments in docs/dev/debt/changes/ and inventory export updates

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5932031649 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22036#pullrequestreview-5932031649). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-17T02:57:47Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `a5182dc50d`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_icu_normalization_tests`, `guest_icu_properties_tests`, `guest_icu_set_tests` built cleanly. - **CTest** (`guest_icu_set`, `guest_icu_properties`, `guest_icu_normalization`): ``` 1/3 Test #3712: guest_icu_properties ............. Passed 0.05 sec 2/3 Test #3722: guest_icu_normalization .......... Passed 0.03 sec 3/3 Test #3696: guest_icu_set .................... Passed 0.11 sec 100% tests passed, 0 tests failed out of 3 ``` - **Negative control**: with `core/libs/prx/libSceIcu/Export.cpp`, `core/libs/prx/libSceIcu/Identified.hpp`, `core/libs/prx/libSceIcu/LegacyExports.cpp`, `core/libs/prx/libSceIcu/Normalization.cpp`, `core/libs/prx/libSceIcu/Normalization.hpp`, `core/libs/prx/libSceIcu/Properties.cpp`, `core/libs/prx/libSceIcu/Properties.hpp`, `core/libs/prx/libSceIcu/Set.cpp`, `core/libs/prx/libSceIcu/include/InventoryExports.hpp`, `core/libs/prx/libSceIcu/include/LegacyExports.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified CMakeLists/Icu.cmake embed generation logic: data files are correctly read as hex, formatted into aligned C++ byte arrays, and registered in the CommonData table with appropriate UDataInfo headers and endianness checks - Verified unorm2_getNFKCInstance, unorm2_getNFKDInstance, unorm2_getNFKCCasefoldInstance_nid_postfix, and u_getFC_NFKC_Closure_nid_postfix error handling and Status conversion in core/libs/prx/libSceIcu/Normalization.cpp - Verified property query exports (u_hasBinaryProperty_nid_postfix, u_getIntPropertyValue_nid_postfix, u_getIntPropertyMaxValue_nid_postfix, u_getIntPropertyMap_nid_postfix) in core/libs/prx/libSceIcu/Properties.cpp with removed data file guards matching embedded data availability - Verified USet boundary and error handling in core/libs/prx/libSceIcu/Set.cpp where string emoji properties (UCHAR_BASIC_EMOJI..UCHAR_RGI_EMOJI) correctly throw NotImplemented_nid_no_patch - Verified AGENTS.md compliance, including technical debt fragments in docs/dev/debt/changes/ and inventory export updates Looks Good To Me
MarcZX10 commented 2026-11-17 03:06:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T03:06:37Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

  • Head a5182dc50d73ec383960ae404d96e85682d10de0, base main. No merged-preview check.
  • Environment: repository reader only (repo_read.py, pinned to head). No build toolchain, no tests.
  • Reader calls:
python3 repo_read.py search unorm2_getNFKCInstance
python3 repo_read.py cat core/libs/prx/libSceIcu/Set.cpp 80 110
python3 repo_read.py search "PropertyNeedsData|uprops|uemoji|ulayout"
python3 repo_read.py cat core/libs/prx/libSceIcu/Normalization.cpp 18 60
python3 repo_read.py search "u_getFC_NFKC_Closure|nfkc_cf|NFKCCasefold" core/libs

Results

Check Result Note
Diff of all 18 reviewed files passed Full diff read; no full file text
Guard removals match description passed Five exports, read in diff
Emoji-string guard passed Set.cpp:98-99
Null error pointer handling failed Non-blocking, see Findings
Embedded entry-point layout passed Read by inspection, not compiled
Build and ctest -R icu not run Author reports 59 of 59 on macOS
Data files present at pin not run Submodule not readable here
Expected test values not run Author-reported, Unicode 17

Findings

Blocking

None.

Non-blocking

  1. core/libs/prx/libSceIcu/Normalization.cpp:124: u_getFC_NFKC_Closure_nid_postfix returns 0 without setting an error when the error pointer is null. The file's Status() helper throws on a null pointer (Normalization.cpp:28-31), the sibling exports do the same, and the debt note in docs/dev/debt/changes/feat-icu-compatibility-normalization.md:4 says a null error pointer throws. A guest calling u_getFC_NFKC_Closure(0x037a, buf, 16, nullptr) gets 0 and no exception, while unorm2_getNFKCInstance(nullptr) throws. The new test does not cover this path. Suggested change, replacing lines 124-125:
    return u_getFC_NFKC_Closure(character, destination, capacity, &Status(error));

Sources

Not verified

  • Event is COMMENT, not APPROVE. Approving needs the embedded data confirmed, and that depends on the ICU submodule and its loader, which the reader cannot read.
  • Build and ctest -R icu were not run here. The 59 of 59 result and the macOS x86_64 build under Rosetta are author-reported.
  • uemoji.icu and ulayout.icu are not in the diff. They come from the ICU submodule, and the diff does not change its pin. Presence and sizes at the pin (14386 and 14448 bytes, per the description) are not confirmed.
  • That ICU reads entries named icudt78l/<file> in this sorted order was not checked against ICU source.
  • Expected properties, maps and normalized strings in the tests follow Unicode 17 and were not checked against ICU data.
  • The claim that the removed unorm_compare guard was dead code, and that the existing TestCompare covers it, were not checked.
  • Console behaviour and ICU 68 differences: not checkable here.
  • Linux and Windows builds, including the CMake HEX embedding: not run.
  • Files read: the diffs of all 18 reviewed files (diff.patch, in full). Full head text of none of them. At head through the reader: Normalization.cpp lines 18-60 and Set.cpp lines 80-110. LegacyExports.cpp (9,665 lines) and LegacyExports.hpp (2,263 lines) were checked only at their removed lines. Excluded by rule: none.

To get this to a good state

Nothing is required.

Optional: make u_getFC_NFKC_Closure throw on a null error pointer, as the debt note says (see Findings).

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5932099215 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22036#pullrequestreview-5932099215). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T03:06:37Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran - Head `a5182dc50d73ec383960ae404d96e85682d10de0`, base `main`. No merged-preview check. - Environment: repository reader only (`repo_read.py`, pinned to head). No build toolchain, no tests. - Reader calls: ``` python3 repo_read.py search unorm2_getNFKCInstance python3 repo_read.py cat core/libs/prx/libSceIcu/Set.cpp 80 110 python3 repo_read.py search "PropertyNeedsData|uprops|uemoji|ulayout" python3 repo_read.py cat core/libs/prx/libSceIcu/Normalization.cpp 18 60 python3 repo_read.py search "u_getFC_NFKC_Closure|nfkc_cf|NFKCCasefold" core/libs ``` ## Results | Check | Result | Note | |---|---|---| | Diff of all 18 reviewed files | passed | Full diff read; no full file text | | Guard removals match description | passed | Five exports, read in diff | | Emoji-string guard | passed | Set.cpp:98-99 | | Null error pointer handling | failed | Non-blocking, see Findings | | Embedded entry-point layout | passed | Read by inspection, not compiled | | Build and `ctest -R icu` | not run | Author reports 59 of 59 on macOS | | Data files present at pin | not run | Submodule not readable here | | Expected test values | not run | Author-reported, Unicode 17 | ## Findings **Blocking** None. **Non-blocking** 1. `core/libs/prx/libSceIcu/Normalization.cpp:124`: `u_getFC_NFKC_Closure_nid_postfix` returns 0 without setting an error when the error pointer is null. The file's `Status()` helper throws on a null pointer (Normalization.cpp:28-31), the sibling exports do the same, and the debt note in `docs/dev/debt/changes/feat-icu-compatibility-normalization.md:4` says a null error pointer throws. A guest calling `u_getFC_NFKC_Closure(0x037a, buf, 16, nullptr)` gets 0 and no exception, while `unorm2_getNFKCInstance(nullptr)` throws. The new test does not cover this path. Suggested change, replacing lines 124-125: ```suggestion return u_getFC_NFKC_Closure(character, destination, capacity, &Status(error)); ``` ## Sources - Null error pointer throws in `Status()`: https://github.com/boykopovar/AnyPS5/blob/a5182dc50d73ec383960ae404d96e85682d10de0/core/libs/prx/libSceIcu/Normalization.cpp#L28-L31 - Silent return on null error: https://github.com/boykopovar/AnyPS5/blob/a5182dc50d73ec383960ae404d96e85682d10de0/core/libs/prx/libSceIcu/Normalization.cpp#L124 - Emoji-string guard: https://github.com/boykopovar/AnyPS5/blob/a5182dc50d73ec383960ae404d96e85682d10de0/core/libs/prx/libSceIcu/Set.cpp#L98-L99 ## Not verified - Event is COMMENT, not APPROVE. Approving needs the embedded data confirmed, and that depends on the ICU submodule and its loader, which the reader cannot read. - Build and `ctest -R icu` were not run here. The 59 of 59 result and the macOS x86_64 build under Rosetta are author-reported. - `uemoji.icu` and `ulayout.icu` are not in the diff. They come from the ICU submodule, and the diff does not change its pin. Presence and sizes at the pin (14386 and 14448 bytes, per the description) are not confirmed. - That ICU reads entries named `icudt78l/<file>` in this sorted order was not checked against ICU source. - Expected properties, maps and normalized strings in the tests follow Unicode 17 and were not checked against ICU data. - The claim that the removed `unorm_compare` guard was dead code, and that the existing `TestCompare` covers it, were not checked. - Console behaviour and ICU 68 differences: not checkable here. - Linux and Windows builds, including the CMake HEX embedding: not run. - Files read: the diffs of all 18 reviewed files (`diff.patch`, in full). Full head text of none of them. At head through the reader: `Normalization.cpp` lines 18-60 and `Set.cpp` lines 80-110. `LegacyExports.cpp` (9,665 lines) and `LegacyExports.hpp` (2,263 lines) were checked only at their removed lines. Excluded by rule: none. ## To get this to a good state Nothing is required. Optional: make `u_getFC_NFKC_Closure` throw on a null error pointer, as the debt note says (see Findings).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!22036
No description provided.