X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Fless.git;a=blobdiff_plain;f=main.c;fp=main.c;h=e4f35b9ac72eb34b2c6557999b940c9927d78887;hp=149999cd4b537fa1d2b38bb969c18c845305772a;hb=0277876eac340b46a0201fc29b70ccb5e5f83f58;hpb=730780fea398916176ce07a4b7a54a45c6e6a1f0 diff --git a/main.c b/main.c index 149999c..e4f35b9 100644 --- a/main.c +++ b/main.c @@ -51,6 +51,7 @@ extern int jump_sline; #ifdef WIN32 static char consoleTitle[256]; +static int savedConsoleCodePage; #endif extern int less_is_more; @@ -103,6 +104,7 @@ main(argc, argv) } } GetConsoleTitle(consoleTitle, sizeof(consoleTitle)/sizeof(char)); + savedConsoleCodePage = GetConsoleOutputCP(); #endif /* WIN32 */ /* @@ -404,6 +406,7 @@ quit(status) #endif #ifdef WIN32 SetConsoleTitle(consoleTitle); + SetConsoleOutputCP(savedConsoleCodePage); #endif close_getchr(); exit(status);