{"thread":{"id":"65905","subject":"Bug report (2.55.0.windows.1): git gui: \"configuration error\" when home directory contains non-ASCII characters on Windows","startedAt":"2026-07-01T18:29:51Z","lastAt":"2026-07-01T18:29:51Z","messageCount":1,"participants":["Martin Malec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"546935","messageId":"d715b56a-2c39-4634-b304-c003df2e8c43@brozkeff.net","threadId":"65905","inReplyTo":null,"subject":"Bug report (2.55.0.windows.1): git gui: \"configuration error\" when home directory contains non-ASCII characters on Windows","fromName":"Martin Malec","fromEmail":"martin@brozkeff.net","sentAt":"2026-07-01T18:29:34Z","receivedAt":"2026-07-01T18:29:51Z","isPatch":false,"body":"What did you do before the bug happened?  Install latest git 2.55.0 \non Win11 25H2 Pro Czech, try starting Git Gui via Start Menu. User \nlogged in via Entra ID (AzureAD) which creates automatically home \ndirectory in C:\\Users\\ containing non-ascii diacritical marks (here \n`ý` - accented `y` in Czech language)\n\nWhat did you expect to happen? Git GUI opens fine\n\nWhat happened instead? Dialog box with error and tofu characters \ninstead of real unicode characters: The defined shell \n('C:/Users/PetraKA1/2ovA¡/AppData/Local/Programs/Git/usr/bin/sh.exe') \nis not usable, it must be an absolute path to an executable.)\n\ngit-gui fails to start with \"The defined shell ('...') is not \nusable, it must be an absolute path to an executable.\" when the \nuser's home directory path contains non-ASCII characters (e.g., \naccented letters from an EntraID profile).\n\nSteps to Reproduce:\n1. Have a Windows user profile with non-ASCII characters in the username\n2. Install Git for Windows (per-user or system-wide under a path \ncontaining non-ASCII chars)\n3. Run `git gui`\n4. Observe the error dialog\n\nRoot Cause as found by OpenCode using Big Pickle AI model: In \n`git-gui.tcl` line 403, `safe_exec [list cygpath -m $_shellpath]` \ncaptures cygpath's output using Tcl's default system encoding (ANSI \ncode page), but cygpath outputs in UTF-8. When the path contains \nnon-ASCII characters, the encoding mismatch produces a corrupted \npath that fails validation. Suggested Fix according to Big Pickle, I \napproved the agent to perform the fix and it worked, then Git GUI \ncould be run fine: Replace the `safe_exec` call with a pipe opened \nthrough `safe_open_command` and explicitly set `-encoding utf-8` on \nthe channel, matching the pattern used in `git_redir` and \n`_parse_config`.\n\n```tcl\nif {[is_Windows]} {\n     set cmdp [make_arglist_safe [list cygpath -m $_shellpath]]\n     set fd [open [concat [list | ] $cmdp] r]\n     fconfigure $fd -encoding utf-8\n     set _shellpath [string trimright [read $fd] \"\\n\\r\"]\n     close $fd\n}\n\n[System Info]\ngit version:\ngit version 2.55.0.windows.1\ncpu: x86_64\nbuilt from commit: bf5afdecc10478397d7059d07573630902fb2e2f\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: D:/git-sdk-64-build-installers/usr/bin/sh\nrust: disabled\nfeature: fsmonitor--daemon\ngettext: enabled\nlibcurl: 8.21.0\nOpenSSL: OpenSSL 3.5.7 9 Jun 2026\nzlib: 1.3.2\nSHA-1: SHA1_DC\nSHA-256: SHA256_BLK\ndefault-ref-format: files\ndefault-hash: sha1\nuname: Windows 10.0 26200\ncompiler info: gnuc: 16.1\nlibc info: no libc information available\n$SHELL (typically, interactive shell): <unset>\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n\nRegards\n\n-- \nMartin Malec\nhttps://github.com/brozkeff/\n"}]}