Repository navigation
fix(json): make real number conversion locale independent - #2069
Closed
STUPIDCONTEM wants to merge 1 commit into
Closed
STUPIDCONTEM wants to merge 1 commit into
STUPIDCONTEM wants to merge 1 commit into
Conversation
8 of 9 tasks
Collaborator
|
Closing: guest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Evidence review (2026-10-09)
Closed by maintainer; not ready to reopen. Required evidence: A title that actually reaches a non-C numeric locale; guest setlocale currently accepts only C/POSIX.
Game/title ID: none verified. No PS5 title execution is claimed.
Deferred after maintainer review: guest setlocale currently accepts only C/POSIX, so the host-locale regression does not demonstrate a reachable title failure. Reopening requires a title that encounters this behavior. See maintainer feedback. The patch and test results below are historical and excluded from the current proposed integration.
What
When the host C numeric locale uses a comma decimal separator, libSceJson2 parses valid JSON
1.5as1and serializes real1.5as invalid JSON1,5. JSON requires a literal decimal point (RFC 8259 section 6).Parse real numbers with an immutable C numeric locale and verify the full token was consumed. Format real numbers with locale-independent
to_charsat the existing 17-digit precision. Preserve nativestrtodrange/subnormal handling and existing-0spelling. No process-wide locale changes are made by the library.Tested
Windows 10 Pro 19045, WinLibs GCC 15.2.0 UCRT posix SEH r7, Release, BUILD_TESTING=ON. Independent branch from
f145139676a48306681d3a4d5fabf83938759daf.guest_jsonfails on unchanged upstream at comma-localeParseReal("1.5") == 1.5and passes three focused runs with the fix.libsbuilds passed; full CTest: 488/488, 29.52 seconds. Committed-head conventions, whitespace and test-registration checks passed.Guest
setlocalecurrently accepts C/POSIX only, so this fixes dependence on locale changes made by host/native code. Linux, PS5 hardware and titles were not tested locally. Open #1390 changes initializer/RTTI exports and #2004 changes object emptiness; neither implements these numeric functions.Checklist
main; no other open PR implements the same change (historical base; current readiness not asserted)