Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codepage and language file switching issues #5209

Merged
merged 5 commits into from
Sep 14, 2024

Conversation

maron2000
Copy link
Contributor

What issue(s) does this PR address?

Some bugs in changing codepages were fixed to address the following two issues.
Keyboard layout is now unchanged while switching codepages.
Codepage is changed appropriately when loading language files using CONFIG command so that menu bar is not glitched.

Tested on VS and MinGW builds on Windows 10 Pro 22H2.

Fixes #5207
Fixes #5208

Keyboard layout unchanged when switching codepages.
image

No menubar glitches when loading language files using CONFIG command. (normal and TTF output)
image

image

@Torinde
Copy link
Contributor

Torinde commented Sep 13, 2024

@maron2000, maybe for a separate PR, can you please add a keyboard combination to switch codepages on-the-fly? The usecase is that when using a non-Latin script codepage (e.g. Cyrillic) the box drawing characters of most installers and programs are missing/rearranged (because they're hardcoded for 437).

It would be great if KEYB or DOSbox-X itself supports a key-combination to change between 437 and whatever codepage is active - for example 3021 moves around the box drawing characters and back in the day we used TSR programs allowing LeftShift + RightShift to change between the codepages on-the-fly (when you need to see something like a game installer menu, which is written in 437, but soon after you'll change back to 3021 in order to read/write in Cyrillic).

  • when codepage is 437 pressing LeftShift + RightShift changes to the 'alternative' one (e.g. 3021 or whatever was set by CHCP or KEYB)
  • when codepage is <>437 pressing LeftShift + RightShift changes to 437

To illustrate why LeftShift+RightShift combo is needed for user to switch to/from 437 - see how EDIT looks with 3021:
image

While how it should look:
image

@maron2000
Copy link
Contributor Author

@Torinde maybe your request will be a feature request rather than putting it here.
I don't know now whether to add such feature is trivial.

@joncampbell123 joncampbell123 merged commit 645d77a into joncampbell123:master Sep 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants