Read UTF-8 settings in the PowerShell launcher #4798

Open
andrewpozdnakov7-jpg wants to merge 1 commit from upstream-pr/4798 into main
andrewpozdnakov7-jpg commented 2026-12-01 09:06:10 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T09:06:10Z.


What it changes

The F1 menu writes victory-settings.txt as UTF-8 without a BOM. On Windows PowerShell 5.1, the script launcher reads an unmarked file in the Windows code page and can change the characters in a saved path, including a custom keyboard bindings filename.

play-nvidia.ps1 now reads UTF-8 with BOM detection and falls back to the existing reader if UTF-8 decoding fails. A matching BOM still selects UTF-8 or UTF-16LE.

How it was tested

  • GPU and profile: the settings check uses synthetic text files on Windows PowerShell 5.1.19041.6456 with code page 1251. No game or GPU run.
  • Before: the exact launcher blocks at v2026.11.30.03 and main 5fabb46e changed a non-ASCII bindings filename in UTF-8 without a BOM. The other three formats read correctly.
  • After: e54151a32f6cb6b82d9865604785d984018c34c6 kept the filename exact in UTF-8 with and without a BOM, UTF-16LE with a BOM, and Windows-1251. -NoMenu still skips the saved file. The full script parsed and cargo xtask policy --staged passed for the one changed file.
  • CI on main has five existing Clippy errors. Main CI / check · Shared lint fix #4707

Checked for overlap

  • I searched issues and PRs for the symptom and reviewed open PRs touching the script. Related: #2868 and #4190 change how saved options are applied. #4795 handles a BOM in the compiled launcher and the F1 writer.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5582508247 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4798). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T09:06:10Z. --- ## What it changes The F1 menu writes `victory-settings.txt` as UTF-8 without a BOM. On Windows PowerShell 5.1, the script launcher reads an unmarked file in the Windows code page and can change the characters in a saved path, including a custom keyboard bindings filename. `play-nvidia.ps1` now reads UTF-8 with BOM detection and falls back to the existing reader if UTF-8 decoding fails. A matching BOM still selects UTF-8 or UTF-16LE. ## How it was tested - GPU and profile: the settings check uses synthetic text files on Windows PowerShell 5.1.19041.6456 with code page 1251. No game or GPU run. - Before: the exact launcher blocks at `v2026.11.30.03` and `main` `5fabb46e` changed a non-ASCII bindings filename in UTF-8 without a BOM. The other three formats read correctly. - After: `e54151a32f6cb6b82d9865604785d984018c34c6` kept the filename exact in UTF-8 with and without a BOM, UTF-16LE with a BOM, and Windows-1251. `-NoMenu` still skips the saved file. The full script parsed and `cargo xtask policy --staged` passed for the one changed file. - CI on `main` has five existing Clippy errors. [Main CI / check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46563306780/job/142355972539) · [Shared lint fix #4707](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4707) ## Checked for overlap - [x] I searched issues and PRs for the symptom and reviewed open PRs touching the script. Related: #2868 and #4190 change how saved options are applied. #4795 handles a BOM in the compiled launcher and the F1 writer. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit. AI-assisted with OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4798:upstream-pr/4798'
git switch 'upstream-pr/4798'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4798'
git switch 'upstream-pr/4798'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4798'
git switch 'upstream-pr/4798'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4798'
git switch 'main'
git merge --squash 'upstream-pr/4798'
git switch 'main'
git merge --ff-only 'upstream-pr/4798'
git switch 'main'
git merge 'upstream-pr/4798'
git push origin 'main'
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
trustno1-coder/VIctory-NVIDIA!4798
No description provided.