Skip to content

fix(vgui): preserve UTF-8 file dialog paths on Windows - #15

Merged
hzqst merged 1 commit into
mainfrom
fix/file-dialog-utf8
Oct 17, 2026
Merged

hzqst merged 1 commit into
mainfrom
fix/file-dialog-utf8

Conversation

@hzqst

@hzqst hzqst commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Chinese filenames are corrupted and Chinese folders cannot be opened when the process uses a non-UTF-8 Windows ANSI code page. Keep VGUI paths in UTF-8 and use wide Windows APIs for enumeration, attributes, the working directory, folder creation and Explorer.

Preserve recursive folder creation, close path-validation search handles, and reduce the default Size/Type column widths from 100/150 to 72/80.

Validation:

  • MSVC Win32 Release build of BetterSpray against this SDK checkout passed.
  • All 13 BetterSpray CTest cases passed, including real process ACP 936 and 65001 filesystem tests covering Chinese, supplementary Unicode and long UTF-8 filenames, recursive directory creation and error paths.
  • Shared formatting checks and git diff --check passed.
  • In-game visual verification has not been performed.

Related to MetaHookSv/MetaHookSv#925 (BetterSpray file-dialog issues only).

Companion plugin changes and regression tests: MetaHookSv/BetterSpray#6
Aggregate submodule update: MetaHookSv/MetaHookSv#929

Use wide Windows filesystem APIs, preserve recursive folder creation, and narrow the size and type columns.

Co-Authored-By: Codex <codex@openai.com>
@hzqst
hzqst merged commit aa12cd3 into main Oct 17, 2026
3 checks passed
@hzqst
hzqst deleted the fix/file-dialog-utf8 branch October 22, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant