Repository navigation
Conversation
|
Independent Windows check of d4fbd45c on 3faac557. Windows 11 build 26300, MSVC 19.44.35230, ACP 1252 / OEM 437. The stock |
Kam471
left a comment
There was a problem hiding this comment.
Reviewed head d4fbd45.
- Configured
runtime(Ninja, RelWithDebInfo, BUILD_TESTING=ON, LEONIDA_BUILD_WINDOWS_RUNTIME=ON, Vulkan 1.4.363) and builtfile_api_codepage_test+file_system_test. file_api_codepage_test.exe->INFO ACP=1252 OEM=437 character=U+00A0, 557 checks, 0 failures. It exercises ANSI, OEM and restored-ANSI input modes on host andGAME:paths, with the native Windows API as the oracle for both results and returned filename bytes.file_system_test.exe-> 159 checks, 0 failures.git diff --checkclean.
Default behaviour is unchanged (AreFileApisANSI() true -> CP_ACP); only widen_ansi reads the mode, and enumeration output intentionally stays ANSI (native confirms that here). Skip 77 when ACP==OEMCP is wired to CTest. No blockers. Coverage note: only the 1252/437 pair was exercised on this machine.
|
Tested
AI-assisted (Claude Code). |
|
Follow-up on the |
Problem
After
SetFileApisToOEM(), the narrow file shims still decode filename inputs withCP_ACP. A valid OEM filename can fail withERROR_FILE_NOT_FOUND, or a create can succeed under the wrong filename. Native Windows accepts the same inputs.Change
widen_ansi()now snapshotsAreFileApisANSI()and selectsCP_ACPorCP_OEMCPfor both conversion calls. This fixes the existing narrow filename input paths without changing CRT arguments or wide APIs.Enumeration output stays ANSI. Native
FindFirstFileA,FindFirstFileExA,FindNextFileA, andGetCurrentDirectoryAon Windows 11 build 26200 still return ANSI bytes in OEM input mode; the native comparisons preserve that distinction.Claimed as RT-418: #5361 (comment)
Depends on: none.
Validation
file_api_codepageCTest exercises all 15 existing narrow file APIs through the production registry, against native Windows, using separate synthetic host and console fixtures in ANSI, OEM, and restored ANSI mode. It selects a character that round-trips differently on the detected code pages and restores process mode and current-directory state.3faac557: 557 checks, 52 failures. With the fix: 557 checks, 0 failures. The native controls succeed in both runs.file_api_codepageand existingfile_system: 2/2 CTests pass; the existing suite reports 159 checks, 0 failures.git diff --checkpasses. Independent source review completed.Integration heads checked: #5187
97278af44e6672356eb4ce0585d8551eacc6902f, #523429dc0a03c2740e6b08ee3ca4b327411c553505ee, #53549c343265c89b6075a6d4aa5d5a6d69166ea3756b. The fix passes independently on main; these integration checks do not add those PRs to this patch.Windows 11 x64 build 26200, MSVC 19.44.35228, Windows SDK 10.0.26100.0. Detected ACP 1252 / OEM 437; selected regression character U+00A0. CPU only, no GPU or game execution, no game files accessed.
Primary references: SetFileApisToOEM, AreFileApisANSI. Output behavior above is measured directly against the native APIs.
AI-assisted: yes.