fix(data): use UTF-8 encoding for git process stdio
Ensures non-ASCII git output (branch names, paths, commit messages) is read and written without locale-dependent corruption.
This commit is contained in:
@@ -236,6 +236,9 @@ public sealed class GitService
|
||||
RedirectStandardInput = stdinData is not null,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
StandardOutputEncoding = Encoding.UTF8,
|
||||
StandardErrorEncoding = Encoding.UTF8,
|
||||
StandardInputEncoding = stdinData is not null ? Encoding.UTF8 : null,
|
||||
};
|
||||
psi.ArgumentList.Add("-C");
|
||||
psi.ArgumentList.Add(workDir);
|
||||
|
||||
Reference in New Issue
Block a user