2

I have an old DOS program (EarlyBird - EB.EXE) that has worked fine for many years on my WIN XP Pro system. The program is started by a shortcut to the .exe (a *.pif file I believe) and is executed by NTVDM and appears to use AUTOEXEC.NT and CONFIG.NT.

Since I have moved from the US to the UK I have recently changed the regional option to UK from US. Now the 'DOS' window will not display the "box drawing" characters correctly.

If I start a CMD prompt and type chcp it displays the Code Page as 850 which seems to be OK although it used to be 437. However, the Early Bird DOS program has a DOS shell exit and if I use that and type CHCP I get the answer 1252.

I have, with the help provided here by @Doktoro Reichard, carried out various experiments including setting the code page in the registry, starting a .bat file with a force via chcp to various code pages, none of these seemed to work.

Finally I reverted the locale back to US and the box drawing characters are now working fine. Strangely enough, a DOS exit from the EB program STILL shows the cp as 1252 whereas a CMD prompt shows 437. This is confusing.

However, I really want the Windows locale to be UK (for a variety of reasons such as date formats, 24-hour clock etc) but I still need my old DOS program to work correctly.

Is there a way to set the locale to UK and still get the correct drawing charaters under NTVDM via the *.pif shortcut?

Thanks

David

David
  • 21

1 Answers1

2

You have unintentionally answered your question:

... but I have recently changed the regional option to UK from US.

That's why the command prompt isn't displaying the correct characters. According to the documentation about chcp:

CHCP.com

Change the active console Code Page. The default code page is determined by the Windows Locale.

Syntax:

CHCP code_page

     code_page  - A code page number (e.g. 437)

By changing from the US to the UK Code Page, you have also changed the way the characters look. If you look at the following pictures, you can then see why the box characters aren't being rendered: because they aren't there:

Luckily though, the solution is simple: run chcp 850(which, although it isn't the original US version, it is mostly compatible with Code Page 437) or chcp 437 at the start of the current command prompt.

Code Page 437 (IBM-ASCII)

Code Page 437 (IBM-ASCII)

.

Code Page 1252 (Western Europe)

Code Page 1252 (Western Europe)