mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #2045] Decode supplementary Unicode in shader index JSON (SHADER-INDEX-SURROGATE-PAIRS) #2051
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2051
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2045
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/shader-index-surrogate-pairs📝 Commits (1)
19a2151Decode supplementary characters in shader index JSON📊 Changes
2 files changed (+36 additions, -7 deletions)
View changed files
📝
runtime/src/shader_library.h(+25 -7)📝
runtime/test/shader_library_test.cpp(+11 -0)📄 Description
Claimed in the coordination issue as: SHADER-INDEX-SURROGATE-PAIRS
What and why
JSON writers can encode one character outside the Basic Multilingual Plane as two
\uescapes. The shader index reader currently encodes those surrogate code units separately, producing invalid UTF-8. Join the pair into one Unicode code point before emitting UTF-8, and refuse an unpaired surrogate. This changes JSON decoding. PR #2043 handles the separate filesystem conversion. RFC 8259, String encodingTested
9f9a7c5f3and passes with the fix. It checks a supplementary object key, the highest Unicode code point as a value, and isolated, mismatched or truncated surrogate pairs.shader_library_testand ran the CMakeshader_librarytest in RelWithDebInfo on Windows 11 with MSVC 19.51. All cases passed.git diff --checkand the source-only check passed.GPUs tested: n/a (CPU-only parser test)
AI-assisted: yes (Codex)
Checklist
main.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.