js-dos icon indicating copy to clipboard operation
js-dos copied to clipboard

Support for national characters

Open ThorvaldAagaard opened this issue 3 years ago • 15 comments

When running my application in js-dos the danish characters ÆØÅ is not accepted. This is probably because I need to changte the Keyboard layout in the DOSBox

Display is ok except a single character ø that is displayed as image

Now I remember setting this up in DOS in the old days, but what is the right way of doing this in js-dos ?

From the command prompt I can use

keyb

telling me that Codepage 437 has been loaded, but when I try to switch to danish using

keyb dk 865

the command just never returns

Same question for load Ansi.sys

ThorvaldAagaard avatar Mar 25 '22 14:03 ThorvaldAagaard

Hi. Interesting question, I never faced this problem before. Games translated to Russian works normally, I think you need to load some dos driver that support your language. like keyrus.sys for Russian.

btw, is

keyb dk 865

never exit because of browser error? can you check browser logs at that moment?

Thank you.

caiiiycuk avatar Mar 27 '22 04:03 caiiiycuk

I have retested and now I get an error in the console

But executing

keyb dk 850 

fails

image

And the result in the console is:

image

Note the difference when trying to load codepage 8 I know is non-existing

Executing just

keyb dk

gives image

ThorvaldAagaard avatar Mar 27 '22 22:03 ThorvaldAagaard

Great, will fix it soon

caiiiycuk avatar Mar 28 '22 02:03 caiiiycuk

@ThorvaldAagaard please confirm that issue is fixed in js-dos v7.3.8

caiiiycuk avatar Mar 29 '22 03:03 caiiiycuk

I will check, but what is the proper way of updating to latest version?

I assumed from https://www.npmjs.com/package/js-dos

npm uninstall -g create-dosbox npm install -g create-dosbox

2nd question is how to check that it is latest version I am running as it is not in the package.json

ThorvaldAagaard avatar Mar 29 '22 08:03 ThorvaldAagaard

create-dosbox is a just bootstrap utility. It downloads js-dos and copy dist/* files to public folder. You need to: npm install js-dos and then copy dist/* files into public directory. or just download new release archive and extract it into public directory

caiiiycuk avatar Mar 29 '22 10:03 caiiiycuk

npm install js-dos

installed the version, and it was now added to package.json

And you are right I had to copy from node_modules/js-dos/dist to the site.

Now

keyb dk 

prints: Keyboard layout dk loaded for codepage 858

Now the Danish Characters is showing fine on the screen

image

but my keyboard layout is still not danish as æøå and ÆØÅ is not working

The Alt-codes are for example

æ = Alt-145 Æ = Alt-146 ø = Alt-155 Ø = Alt-157 å = Alt-134 Å = Alt-143

and is working fine

So it seems my keyboard isn't mapped correctly in js-dos - any sugestions?

By the way you can see my site at https://turnhelp.snippen.dk

ThorvaldAagaard avatar Mar 29 '22 11:03 ThorvaldAagaard

Looking at the DOSBox configuration it might be that i should change the keyboardlayout in the dos-section https://www.vogons.org/viewtopic.php?t=21824

but then js-dos will not load the file

BTW what is the proper way of executing commands during start? I have tried adding it to the jsdos.conf autoexec section, but that seems not to change anything

ThorvaldAagaard avatar Mar 29 '22 14:03 ThorvaldAagaard

You should use autoexec section in .jsdos/dosbox.conf. .jsdos/jsdos.json is not used by dosbox it self, you can ignore it.

caiiiycuk avatar Mar 29 '22 14:03 caiiiycuk

but then js-dos will not load the file

interesting, will look into

caiiiycuk avatar Mar 29 '22 15:03 caiiiycuk

@ThorvaldAagaard Please check, should be fixed in v7.3.9

caiiiycuk avatar Apr 05 '22 06:04 caiiiycuk

js-dos is now loading the file fine, and it seems to work, as I get this response

image

Only problem is that the national keys still isn't working

Any ideas?

ThorvaldAagaard avatar Apr 05 '22 09:04 ThorvaldAagaard

Mmm, sorry I don't know how national keys are implemented in dos. In Russia we used driver to enter national chars from keyboard. It's called keyrus. Maybe you have something similar for Danish

caiiiycuk avatar Apr 05 '22 15:04 caiiiycuk

It is working fine in DOSBox 0.74-3 when running on my windows pc. I assume that is because DOSBox finding my current language setup from windows.

I have checked that my chrome is set to danish

I have looked around and the problem is that danish characters is placed in Codepage 865 Nordic, and not in 850 (or 858)

I found a chrome extension called DOSBox, and it seems to have the same kind of problem (But here the key shows another character)

I am currently also testing my DOS application in DOSBox-X from https://dosbox-x.com/ and everything works fine including print, so perhaps the idea of running it in Chrome is not the right solution for me

ThorvaldAagaard avatar Apr 05 '22 17:04 ThorvaldAagaard

js-dos is limited version of dosbox that works if browser, so not all features will work in browser. Thank you for interest.

caiiiycuk avatar Apr 07 '22 04:04 caiiiycuk