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
Unicode (and [autoexec]) improvements #2422
Conversation
1615971
to
199cdad
Compare
This is pretty good @FeralChild64 ! |
Even though all this Unicode management is a sophisticated task, the code is extremely natural to read with very clear variable and function names, bool names, and extensive self-documenting lambas (along with all the error logging in the labdas to avoid repetition). This is quite a masterpiece of Unicode handling @FeralChild64! All of my comments are just minor simplifications or suggestions. I'm not sure how to type the Polish characters (as I routinely don't use the `Alt+combos), however at least testing w/ the sanitizers and passing in batch files is OK: If there are any copy-and-paste (or bat files) I can help test with, happy to run them through if you can attach any. |
Right ALT + letter (has to be the right one, left ALT won't work). |
c8df7d3
to
ec15bb6
Compare
ec15bb6
to
c1b21c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time to merge; all comments addressed and passing tests. 🚀
Since my previous [autoexec]-related PR was just merged, here is another one :) As the 1st commit is just a file formatting cleanup, and the 2nd one just adds Unicode-related definitions, I suggest to review this PR commit by commit.
Unicode related improvement:
[autoexec] section improvements:
CONFIG -axadd <line>
command now converts the line from current DOS code page to UTF-8CONFIG -axtype
now converts the [autoexec] section to currently set DOS code pageRemarks:
encode.sh
orencode.bat
script (changenfc
tonfkd
), and execute it to generate incorrectly normalized translation files; such translations should now workZ:\AUTOEXEC.BAT
is not translated from UTF-8 to DOS code page yet (onlyCONFIG -axtype
works with UTF-8); implementing this correctly needs some significant effort - my branch https://github.com/dosbox-staging/dosbox-staging/tree/fc/autoexec-1 mostly does it, but there are still some edge cases which are not resolved yetCONFIG -axtype
, try the following sequence of command:To type accented letters above - in keyboard layout
pl
press Right ALT+letter key combination. Explanation: both 667 and 668 are code pages for Polish language, but mutually incompatible. The 437 does not support Polish, most needed accented characters are absent.