Skip to content

Commit 975e780

Browse files
committed
Merge pull request #142 from kblees/kb/remove-chcp
git-wrapper: don't set the console input code page
2 parents 438f3e7 + 9ed3894 commit 975e780

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

compat/win32/git-wrapper.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ int main(void)
321321
WCHAR exepath[MAX_PATH], exe[MAX_PATH];
322322
LPWSTR cmd = NULL, exep = exe, prefix_args = NULL, basename;
323323
LPWSTR working_directory = NULL;
324-
UINT codepage = 0;
325324

326325
/* Determine MSys2-based Git path. */
327326
swprintf(msystem_bin, sizeof(msystem_bin),
@@ -437,10 +436,6 @@ int main(void)
437436
}
438437
}
439438

440-
/* set the console to ANSI/GUI codepage */
441-
codepage = GetConsoleCP();
442-
SetConsoleCP(GetACP());
443-
444439
{
445440
STARTUPINFO si;
446441
PROCESS_INFORMATION pi;
@@ -499,7 +494,5 @@ int main(void)
499494

500495
free(cmd);
501496

502-
/* reset the console codepage */
503-
SetConsoleCP(codepage);
504497
ExitProcess(r);
505498
}

0 commit comments

Comments
 (0)