fix code page 950

This commit is contained in:
Wengier
2021-11-08 03:37:08 -05:00
parent 1701c0db83
commit d61990deab
4 changed files with 8 additions and 5 deletions

View File

@@ -11,6 +11,9 @@
- Applied UTF-8 conversions to file browse dialog
boxes for selecting files containing Unicode
characters (e.g. CJK characters). (Wengier)
- Added warning message if the Japanese PC-98 or JEGA
machine type is selected and a language file with
an incompatible code page is specified. (Wengier)
- Added code to INT 18h emulation (IBM PC mode) to
jump to ROM BASIC if the user provided an IBM
ROM BASIC image to load. (joncampbell123)

View File

@@ -1187,7 +1187,7 @@ BIOSTEST 映像檔
.
:PROGRAM_KEYB_INFO_LAYOUT
給鍵盤配置 %s 使用的字碼頁 %i 已載入
字碼頁 %i 已為鍵盤配置 %s 載入
.
:PROGRAM_KEYB_SHOWHELP
@@ -1203,7 +1203,7 @@ KEYB [鍵盤配置 ID [字碼頁編號 [字碼頁檔案]]]
.
:PROGRAM_KEYB_NOERROR
在字碼頁 %i 作用下的鍵盤配置 %s 已載入
已載入鍵盤配置 %s 作用於字碼頁 %i
.
:PROGRAM_KEYB_FILENOTFOUND
@@ -1216,7 +1216,7 @@ KEYB [鍵盤配置 ID [字碼頁編號 [字碼頁檔案]]]
.
:PROGRAM_KEYB_LAYOUTNOTFOUND
在字碼頁 %i 作用下的鍵盤配置 %s 無法找到
無法找到鍵盤配置 %s 作用於字碼頁 %i
.
:PROGRAM_KEYB_INVCPFILE

View File

@@ -1246,7 +1246,7 @@ public:
const Section_prop* section = static_cast<Section_prop*>(configuration);
const char * layoutname=section->Get_string("keyboardlayout");
dos.loaded_codepage=(IS_PC98_ARCH || IS_JEGA_ARCH || IS_JDOSV ? 932 : (IS_KDOSV ? 949 : (IS_CDOSV ? 950 : (IS_PDOSV ? 936 : 437)))); // US codepage already initialized
int tocp=!strcmp(layoutname, "jp")||IS_JDOSV?932:(!strcmp(layoutname, "ko")||IS_KDOSV?949:(!strcmp(layoutname, "tw")||!strcmp(layoutname, "hk")||IS_CDOSV?950:(!strcmp(layoutname, "cn")||!strcmp(layoutname, "zh")||IS_PDOSV?936:(!strcmp(layoutname, "us")?437:0))));
int tocp=!strcmp(layoutname, "jp")||IS_JDOSV?932:(!strcmp(layoutname, "ko")||IS_KDOSV?949:(!strcmp(layoutname, "tw")||!strcmp(layoutname, "hk")||!strcmp(layoutname, "zht")||IS_CDOSV?950:(!strcmp(layoutname, "cn")||!strcmp(layoutname, "zh")||!strcmp(layoutname, "zhs")||IS_PDOSV?936:(!strcmp(layoutname, "us")?437:0))));
if (tocp) layoutname="us";
#if defined(USE_TTF)

View File

@@ -6158,7 +6158,7 @@ void KEYB::Run(void) {
std::string cp_string="";
int32_t tried_cp = -1;
cmd->FindCommand(2,cp_string);
int tocp=!strcmp(temp_line.c_str(), "jp")?932:(!strcmp(temp_line.c_str(), "ko")?949:((!strcmp(temp_line.c_str(), "tw")||!strcmp(temp_line.c_str(), "hk")||(!strcmp(temp_line.c_str(), "zh")&&(cp_string.size()&&atoi(cp_string.c_str())==950))||(!cp_string.size()&&dos.loaded_codepage==950))?950:(!strcmp(temp_line.c_str(), "cn")||!strcmp(temp_line.c_str(), "zh")?936:0)));
int tocp=!strcmp(temp_line.c_str(), "jp")?932:(!strcmp(temp_line.c_str(), "ko")?949:(!strcmp(temp_line.c_str(), "tw")||!strcmp(temp_line.c_str(), "hk")||!strcmp(temp_line.c_str(), "zht")||(!strcmp(temp_line.c_str(), "zh")&&(cp_string.size()&&atoi(cp_string.c_str())==950))?950:(!strcmp(temp_line.c_str(), "cn")||!strcmp(temp_line.c_str(), "zhs")||!strcmp(temp_line.c_str(), "zh")?936:0)));
if (tocp && !IS_PC98_ARCH) {
dos.loaded_codepage=tocp;
const char* layout_name = DOS_GetLoadedLayout();