diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-11-19 09:46:57 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-11-19 09:46:57 +0100 |
commit | 010273268665746e188324e49730704c83aa8752 (patch) | |
tree | 57e441ab2a65be79e7e54755619518f9f4468c74 /mysys/my_init.c | |
parent | 220dc1fd59e61a44718a38ea59de5dc1da5aab8f (diff) | |
download | mariadb-git-st-10.8-wlad.tar.gz |
Revert "MDEV-26713 Windows - improve utf8 support for command line tools"st-10.8-wlad
This reverts commit several commits pushed by mistake.
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r-- | mysys/my_init.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c index b52f593af1e..d201d45a4ee 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -67,38 +67,6 @@ static ulong atoi_octal(const char *str) MYSQL_FILE *mysql_stdin= NULL; static MYSQL_FILE instrumented_stdin; -#ifdef _WIN32 -UINT orig_console_cp, orig_console_output_cp; - -static void reset_console_cp(void) -{ - SetConsoleCP(orig_console_cp); - SetConsoleOutputCP(orig_console_output_cp); -} - -/* - The below fixes discrepancies in console output and - command line parameter encoding. command line is in - ANSI codepage, output to console by default is in OEM, but - we like them to be in the same encoding. - - We do this only if current codepage is UTF8, i.e when we - know we're on Windows that can handle UTF8 well. - */ -static void set_console_cp() -{ - UINT acp= GetACP(); - if (acp == CP_UTF8 && !getenv("MARIADB_DISABLE_UTF8_CONSOLE")) - { - orig_console_cp= GetConsoleCP(); - SetConsoleCP(acp); - orig_console_output_cp= GetConsoleOutputCP(); - SetConsoleOutputCP(acp); - atexit(reset_console_cp); - } -} -#endif - /** Initialize my_sys functions, resources and variables @@ -163,7 +131,6 @@ my_bool my_init(void) #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); - set_console_cp(); #endif #ifdef CHECK_UNLIKELY init_my_likely(); |