summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/fhandler_tty.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 37d033bbe..95b28c3da 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1830,7 +1830,11 @@ fhandler_pty_slave::setup_locale (void)
extern UINT __eval_codepage_from_internal_charset ();
if (!get_ttyp ()->term_code_page)
- get_ttyp ()->term_code_page = __eval_codepage_from_internal_charset ();
+ {
+ get_ttyp ()->term_code_page = __eval_codepage_from_internal_charset ();
+ SetConsoleCP (get_ttyp ()->term_code_page);
+ SetConsoleOutputCP (get_ttyp ()->term_code_page);
+ }
}
void