diff --git a/CHANGELOG b/CHANGELOG index 76fae2993ae..8186001249b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ Next - Enhanced Dynamic and Differencing VHD support #4273 (maxpat78) - Imported IBM Music Feature Card support from DOSBox Staging. (Allofich) - Fix day of week detection (INT 21h 0x2Ah). (maron2000) + - Refine KEYB and CHCP command (maron2000) 2023.05.01 - IMGMAKE will choose LBA partition types for 2GB or larger disk images, but the user can also use -chs and -lba options to override diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 5ce58de5634..2295049fd0e 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -7741,6 +7741,8 @@ class TITLE : public Program { } }; +bool CodePageGuestToHostUTF8(char *d/*CROSS_LEN*/,const char *s/*CROSS_LEN*/); + void TITLE::Run() { // Hack To allow long commandlines @@ -7751,8 +7753,13 @@ void TITLE::Run() PrintUsage(); return; } - char *args=(char *)cmd->GetRawCmdline().c_str(); - dosbox_title=trim(args); + char *args=trim((char *)cmd->GetRawCmdline().c_str()); + char title[4096]; + if(CodePageGuestToHostUTF8(title, args)) { + dosbox_title=title; + } else { + dosbox_title=args; + } SetVal("dosbox", "title", dosbox_title); GFX_SetTitle(-1,-1,-1,false); }