Revision: 7983 https://osdn.net/projects/ttssh2/scm/svn/commits/7983 Author: yutakapon Date: 2019-08-18 11:57:16 +0900 (Sun, 18 Aug 2019) Log Message: ----------- r7978 の再修正。setlocaleが失敗した場合は、現在にANSIコードページを設定する。 Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/7978 Modified Paths: -------------- trunk/teraterm/teraterm/vtterm.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtterm.c =================================================================== --- trunk/teraterm/teraterm/vtterm.c 2019-08-17 14:05:45 UTC (rev 7982) +++ trunk/teraterm/teraterm/vtterm.c 2019-08-18 02:57:16 UTC (rev 7983) @@ -400,11 +400,15 @@ strcpy(ts.Locale, DEFAULT_LOCALE); result = setlocale(LC_ALL, ts.Locale); } - // \x89p\x8C\xEA\x94\xC5Windows95/NT4.0\x82ł́Ats.Locale\x82\xAA\x83f\x83t\x83H\x83\x8B\x83g\x82\xCC"japanese"\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A - // setlocale\x82\xAA NULL \x82\xF0\x95Ԃ\xB7\x82\xBD\x82߁ATera Term\x82̋N\x93\xAE\x8E\x9E\x82ɗ\x8E\x82\xBF\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x81B - // setlocale \x82ɐ\xAC\x8C\x{1C2D42}\xBD\x8E\x9E\x82̂݁A\x83R\x81[\x83h\x83y\x81[\x83W\x82\xF0\x90ݒ肷\x82\xE9\x81B + // \x89p\x8C\xEA\x94\xC5Windows\x82ł́Ats.Locale\x82\xAA\x83f\x83t\x83H\x83\x8B\x83g\x82\xCC"japanese"\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A + // setlocale\x82\xAA NULL \x82\xF0\x95Ԃ\xB7\x82\xBD\x82߁ATera Term\x82̋N\x93\xAE\x8E\x9E\x82ɗ\x8E\x82\xBF\x82\xE9\x81Bstrrchr\x82\xCC + // \x91\xE61\x88\xF8\x90\x94\x82ɂ\xCDNULL\x82\xAA\x8Ew\x92\xE8\x82ł\xAB\x82Ȃ\xA2\x82\xBD\x82߁B + // setlocale \x82ɐ\xAC\x8C\x{1C2D42}\xBD\x8E\x9E\x82̓R\x81[\x83h\x83y\x81[\x83W\x82\xF0\x90ݒ肵\x81A\x8E\xB8\x94s\x82\xB5\x82\xBD\x8E\x9E\x82\xCD + // ANSI\x83R\x81[\x83h\x83y\x81[\x83W\x82\xF0\x90ݒ肷\x82\xE9\x81B if (result) ts.CodePage = atoi(strrchr(result, '.')+1); + else + ts.CodePage = GetACP(); } void ResetKeypadMode(BOOL DisabledModeOnly)