Windows probe changes Unicode directory names during path translation #17

Closed
opened 2026-11-26 20:44:24 +00:00 by github-bot · 0 comments
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 07:47 UTC · original

On Windows, gtavi_probe reports a successful translation for C:\Exports\music-😀, but both paths in the output end in music-??. This affects diagnostic output someone might copy into a report. I reproduced it on main at 71766d8 using only path strings.

Reproduce

Build the probe as usual. In Python, set probe to the resulting executable and run the following. Capturing raw stdout rules out a terminal font or display issue.

import subprocess

probe = r"build\tools\Release\gtavi_probe.exe"
leaf = "music-\U0001f600"
windows = "C:\\Exports\\" + leaf
posix = "/mnt/c/Exports/" + leaf
for option, path in [("--to-posix", windows), ("--to-windows", posix)]:
    result = subprocess.run([probe, option, path], capture_output=True)
    print(result.returncode, result.stdout.splitlines()[-1])

Both translations should preserve the directory name. With leaf = "music" the expected output is returned on all three hosts.

Host Observed result for music-😀
Windows Server 2025 x64, build 26100, MSVC 19.52, ANSI code page 1252 Both exit 0 and emit two literal question marks. Runner log
Windows 11 x64, build 26100, MinGW-w64 GCC 15.2, ANSI code page 936 Both exit 0 and emit the same two question marks.
Linux x86-64, GCC 15.2, UTF-8 Both preserve the directory name. Runner log

On the code-page-936 host, replacing the leaf with "\u4e57" (乗) also reproduces a failure with a representable character. Its local bytes are 81 5c. The Windows-to-POSIX output drops the second byte. The reverse operation exits 1 and reports a literal backslash in the supplied POSIX path. Calling the two core path functions directly with the UTF-8 strings preserves both names.

A local experiment with a UTF-8 process manifest fixed the redirected output. With the same experimental executable, a private Windows console using output code page 936 still displayed the wrong directory name. A regression check should cover both redirected bytes and native console output. Microsoft’s console code page documentation

I’m investigating a probe-scoped fix. The standalone comparison script exercises both directions.

Agent environment: Codex + GPT-6.2 Astra (xhigh).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 07:47 UTC · [original](https://github.com/JamesCicada/GTAVI-Recomp/issues/17) On Windows, `gtavi_probe` reports a successful translation for `C:\Exports\music-😀`, but both paths in the output end in `music-??`. This affects diagnostic output someone might copy into a report. I reproduced it on main at `71766d8` using only path strings. ### Reproduce Build the probe as usual. In Python, set `probe` to the resulting executable and run the following. Capturing raw stdout rules out a terminal font or display issue. ```python import subprocess probe = r"build\tools\Release\gtavi_probe.exe" leaf = "music-\U0001f600" windows = "C:\\Exports\\" + leaf posix = "/mnt/c/Exports/" + leaf for option, path in [("--to-posix", windows), ("--to-windows", posix)]: result = subprocess.run([probe, option, path], capture_output=True) print(result.returncode, result.stdout.splitlines()[-1]) ``` Both translations should preserve the directory name. With `leaf = "music"` the expected output is returned on all three hosts. | Host | Observed result for `music-😀` | | --- | --- | | Windows Server 2025 x64, build 26100, MSVC 19.52, ANSI code page 1252 | Both exit 0 and emit two literal question marks. [Runner log](https://github.com/RavenCurseBurg/GTAVI-Recomp/actions/runs/45570396363/job/139055333633) | | Windows 11 x64, build 26100, MinGW-w64 GCC 15.2, ANSI code page 936 | Both exit 0 and emit the same two question marks. | | Linux x86-64, GCC 15.2, UTF-8 | Both preserve the directory name. [Runner log](https://github.com/RavenCurseBurg/GTAVI-Recomp/actions/runs/45570396363/job/139055333987) | On the code-page-936 host, replacing the leaf with `"\u4e57"` (乗) also reproduces a failure with a *representable* character. Its local bytes are `81 5c`. The Windows-to-POSIX output drops the second byte. The reverse operation exits 1 and reports a literal backslash in the supplied POSIX path. Calling the two core path functions directly with the UTF-8 strings preserves both names. A local experiment with a UTF-8 process manifest fixed the redirected output. With the same experimental executable, a private Windows console using output code page 936 still displayed the wrong directory name. A regression check should cover both redirected bytes and native console output. [Microsoft’s console code page documentation](https://learn.microsoft.com/en-us/windows/console/console-code-pages) I’m investigating a probe-scoped fix. The [standalone comparison script](https://github.com/RavenCurseBurg/GTAVI-Recomp/blob/e85fd77563674e6450b2ea5cadd120b9f60fef7e/tests/compare_probe_unicode.py) exercises both directions. Agent environment: Codex + GPT-6.2 Astra (xhigh).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:44:24 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.