Link to home
Start Free TrialLog in
Avatar of c_schou
c_schou

asked on

Codepage for dos in win2k?

Hi I have just upgraded from win98SE to win2k pro SP1, danish. In my work I use a old dos program, which
runs fine under win98SE. I can install and run the dos-program on win2k, but the letters are all wrong.
Is it possible to specify a codepage or other file in a special config.sys file to correct this problem,
and if so, where can this special file be obtained/downloaded.
I have tried the command: mode con codepage select=850 at the dosprompt before starting the program but on luck...
Thanks in advance Christian
Avatar of Nosterdamus
Nosterdamus
Flag of Israel image

Hi c_svhou,

You should set the Country parameter.

Country, enables the MS-DOS subsystem to use international time, dates, currency, case conversions, and decimal separators.

The country command configures the MS-DOS subsystem to recognize the character set and punctuation conventions observed when using one of the supported languages. Use the %systemroot%\System32\Config.nt file, or the equivalent startup file specified in a program's PIF, to load the Country/Region setting.

country=xxx[,[yyy][,[drive:][path] filename]]

Parameters

xxx

Specifies the Country/Region code.

yyy

Specifies the code page for the Country/Region.

[drive:][path] filename

Specifies the location and name of the file containing Country/Region information.

Hope this helps,

Nosterdamus
Avatar of c_schou
c_schou

ASKER

Hi Nosterdamus
Thanks for the fast reply, but unfortunatly it isn't enough. My dos application works fine under win95, win98 and winME (all US versions), but not on winNT (DK and UK), win2K (DK/UK) or winXP (UK). That is, the program runs flawlessly but some of the text is totally unreadabel.

Regards
c_schou
Could you tell us, what program it is ?.
(that way we might do some testing, and figure out a workaround)
Hi c_schou,

The above comment refers to Win 2000 (and may be Win NT).

Pls try it and tell us if it works.

Thanks,

Nosterdamus
Avatar of c_schou

ASKER

Hi tonnybrandt and Nosterdamus

The program is called Saturn developed by a analytical company called Varian who produces masspectrometers ( an analytical instrument used in chemical and biological analysis) and software for analyses of collected data. I have checked their homepage and representative but they can't help me with this specific problem unfortunatly.

Concerning the country code etc. I have succeded, with no special effort to make Saturn run under win95, 98SE and ME. Under winNT4 SP6 and win2k SP1 it starts and most of the text is unreadable. The strange thing is that menu option titles, like "Files", is perfect. Its text on the monitor which changes with varying data, text describing data intensity, which is unreadable.

Thanks for your effort until now, both of you...
Regards
c_schou
Hi c_schou,

Your question:
>>>>Is it possible to specify a codepage or other file in a special config.sys file to correct this problem

My answer (for Win2k):
>>>>Use the %systemroot%\System32\Config.nt file, or
the equivalent startup file specified in a program's PIF, to load the Country/Region setting.

For further instructions on how to set the Country, please see my comment posted on 06/09/2001 04:57PM PST.

Did you try it?

Nosterdamus
Avatar of c_schou

ASKER

Hi Nosterdamus
Sorry if I havn't replied specifically enough. Yes I have tested your suggestion concerning the %systemroot%\System32\Config.nt file, testing both US (country 01, keybd 437,850) and DK danish (045, 850,865), both on UK and DK versions of winNT4 SP6, and UK, DK versions of win2k SP1, but the dos program interface is still unreadable.
Regards
c_schou
Hi c_schou,

Try this MS article:http://support.microsoft.com/support/kb/articles/Q165/2/14.ASP?LN=EN-US&SD=gn&FR=0&qry=dos&rnk=34&src=DHCS_MSPSS_gn_SRCH&SPR=WIN2000, it might provide you with some valuable info.

Pls tell us if it helps,

Nosterdamus
ASKER CERTIFIED SOLUTION
Avatar of tonnybrandt
tonnybrandt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of c_schou

ASKER

Hi Nosterdamus
I have followed the link you kindly suggested and all options suggested is as stated in the text from MS, but still no readable txt in my dos program.

And to you Tonny.
The program is a very old dos program, probably before win3.1, and the only reason I going through all this effort to make it work, and bother you with strange problems, is its extreemly easy to use when handling big amounts of data (integrations and other computations).
Unfortunatly I'm not familiar with programming and how compilers work so I can't tell whether your comments on this point is correct.
I found ansi.sys on the win95 machines and have added it, but no luck. Below is my autoexec.nt and config.nt from my win2k, SP1, machine,
autoexec.nt:
c:\saturn\dos\nlsfunc.exe
mode con codepage select=((850)c:\saturn\dos\ega.cpi)
chcp 850
keyb us,,c:\saturn\dos\keyboard.sys

Config.nt
DOSONLY
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40
device=c:\saturn\dos\ansi.sys
mode con codepage select=850
country=001,,c:\saturn\dos\country.sys
device=c:\saturn\dos\display.sys con=(ega,850,1)

Thanks again both of you
Christian

In the meantime i have had some time to think, and i don't think it is one of those programs that tries to access the hardware directly, as nt and 2000 would come with an error/warning message about this.

One thing that bothers me in your config.nt and autoexec.nt, is the path:
c:\saturn\dos\

That is not normal.
The normal path is some thing like:
%SystemRoot%\system32\

where all the dos programs resides.

So i suggest that you make a backup of config.nt and autoexec.nt and change the path to %SystemRoot%\system32\ and see if there is any difference.

Regards
Tonny
Also try removing DOSONLY from config.nt. This has to do with TSR's and might have something to do with it.

Also try typing this command in start | run

cmd /c <path to your dos saturn application>

and see what happens.


Hi c_schou,

All the facts that where posted here direct me to think that there is some incompatability with your local character set in a DOS window (as you mentioned before, the program can run but you see Geebrish on the screen except for US English characters).

Do you have any other native DOS program that you can run in a DOS window in order to check this? Can you see the characters as they should be?

If you don't, then maybe you can create a DOS text file (you can create it on one of your Win 9x (Me) platforms, copy it to you Win 2000 (NT), open a DOS window and type:
type MyTextFile.TXT

This will tell us for once and for all if your problem is charcter set in DOS or not.

Just a thought...

Nosterdamus
Avatar of c_schou

ASKER

Hi Tonny
Restored all "c:\saturn\dos\" references from autoexec.nt and config.nt to %SystemRoot%\system32\ and made sure all the files referred to in the two files existed under %SystemRoot%\system32\, plus removal of "dosonly". Tried dos-program with both US codes installed and Danish, but no luck. Tested "cmd /c C:\saturn" at file /run prompt before executing saturn.exe file. The monitor flickered, black for two sec, came back again but no changes in the dos program characters.

Hi Nosterdamus
The only dos program I had at hand was Norton commander version 3.0. I believe its a pure dos program. It installed well and displayed all US characters correctly, but it is a US version, so no non-US characters to display.

I created a dos txt file under winME (US), typed in both normal and special characters (danish). When wieving the file from dos prompt under win2k, sp1, DK, the normal characters work well but the danish are all wrong. The special characters (???) are replaced with O?? (US characters 79, 230, 248)
I tried, still at dos prompt, to select codepage, 437, 850, 865, 863 and wiev my dos txt file but the result was no different.
The nonsense txt in my dos program Saturn, which is an US version only, can only display US characters....

Please tell me if you get tired of this....

PS: I have taken a screen dump of the dos program window, 120.000 bytes JPG file, but I dont' know how to show it here...

Thanks again
Christian


I'm breaking a principle here, but my email address is
tonnybrandt@hotmail.com

send it and i'll have a look at it.
Hi c_schou,

I think that your test confirms what I thought is the problem. The problem is with the implementation of non-US characters in a DOS session.

To my opinion, if there is a fix for that, then it shoulb be in the Win 2000 SP-2. I therfore reccomend to install the Windows 2000 SP-2 (released on May 16'th).
The file NTDVM (NT Dos Virtual Machine) was debugged as well, and it might be that your problem is solved with this release.

I tried to find some documentation for your problem in the release note, but with no avail.

Follow this link for download and installation instruction:
http://support.microsoft.com/support/kb/articles/Q260/9/10.ASP

Hope this will help,

Nosterdamus
Nosterdamus:
C_schou send a screen dump to me, and i took a look at it. Most of the screen is perfectly normal, only in a couple of areas it is unreadable, and the symptoms are as follows:
All static text in varios colors are completely normal, and include caracters like ^ C c and so on. That's all fine. Some text that is dynamic is completely distorted. This text is supposed to be white. IMHO this has nothing to do with the codepage, as most of the screen is OK.

c_schou:
I think you should post your emailaddress, so nosterdamus can contact you directly and get a screen dump, so he can see what the screen looks like.
As to the problem, i have a few ideas, that you can try, but i don't have high hopes to get it working. Look at this page and you'll see why:
http://support.microsoft.com/support/kb/articles/Q101/7/08.asp?LN=EN-US&SD=gn&FR=0&qry=dos&rnk=4&src=DHCS_MSPSS_gn_SRCH&SPR=NTW40

I suggest that you make this little test:
When booting hit F8 and you should be able to get into safe mode, which will be using a standard vga driver for the graphic. Run the program in here and see if it will work.
If this works ok, then starup in normal mode and try changing the driver to a standard svga driver, and test again.
If this is ok then get the latest drivers for your graphic card from the manufacturer and install them. Infact you should do that anyway IMHO.

If none of the above helped, the only thing left is this:
(Don't bother doing it if you already tried the program on a fresh installed win 2000. (not an upgrade))

Boot on the windows 2000 cd and install another windows 2000 on your machine. Install it in a different directory or partition, than the original.
DO NOT FORMAT OR REPARTITION ANY DRIVES AT ANY TIME DURING THE INSTALLATION.
It will ask you before doing so.
This will create a bootmenu where you can startup the new win2000. Try the program on this fresh installation. Don't make any changes to config.nt and autoexec.nt before running the program.
Hi c_schou,

After reading tonny's comment, it seems to me that installing a SVGA driver in your win 2k machine and check the app on this configuration, should be the next test to perform.

Nosterdamus

P.S. Sorry for not posting my e-mail here (this is a principle which I prefer not to break...;-)), but if you'll post yours, I'll contact you....
Any progress ?.
Avatar of c_schou

ASKER

Hi Nosterdamus and tonnybrandt
Sorry for the large break but I have been on hollyday....

My win2k is a clean install with SP2 installed (Danish).

Tonny: regarding the link you mentioned the prg. Staurn only run in a full window.

The F8 trick made no difference, so I installed the latest video drivers - again no difference. Then I removed my generic video driver and installed a standard vga driver, did the F8 trick but no luck.....

My email adresses is christian.schou@risoe.dk

Many thanks again to both of you
Christian Schou
I'm out of ideas.

BTW the OEMCP trick helped me with an anoying problem i had at work, so i did get something out of this question. :-)

Regards
Tonny
Hi c_schou,

After looking at the screen shot you've sent me, I must say that it looks terribley familiar to me...

I recall that back in the mid 80's, when Hercules introduced their first EGA\VGA adapters, this problem occured as well, when an application was running in graphic mode with code pages other than US.

What had to be done to fix the problem, is to run some TSR program to emulate the calls to the DOS Int 10h handler.

Equiped with the above info, I made some research in the MSDN KnowladgeBase, and found this (Code Page Specific Fonts Are Lost When a DOS Program Switches to Graphics Mode):
http://support.microsoft.com/support/kb/articles/Q269/1/49.ASP

From the look of the Screen Shot, it is clear that the application is using Dos Graphic mode (see the app Logo). Therefore, I'm afraid that there is not much we can do to run the app in Win 2000 & Win NT platforms.

Since it looks as if there is no working solution to the problem, here is what I suggest:
1. Run this app on a Win 9x machines ONLY (might run on Win ME as well).
2. Look for another application that does the same, but which is designed to run on WinNT platforms.


Nosterdamus
Hi c_schou (You are not alone) :~)

Recently i came across another program which has the same distortion of caracters. This program ran perfectly on win 9x and windows NT !!!, but all text was distorted on the windows 2000. This was tested on three different win 2000 machines, with different regional settings, graphic adapters and codepage. Only the logo on the front page was visible, the menu (where the caracters was supposed to be white!!) was completly unreadable.
I took the program home and tried to make it work on my home win 2000, but unsuccessfully.

The program is an old 16bit dos program called Borland Reflex. It apparently is an old flatfile database with some graphic extensions for labelling or something like that. Tried to find info on the net, but there was nothing helpful out there.
Luckily for us, we will never run this program on a win 2000, only win 9x and NT, so it is not a problem for us, but i thought i would use this program to troubleshoot your problem, unfortunately unsuccessfull.

Regards
Tonny
For c_schou,

It's time to resolve this question, so I will leave a recommendation in Community Support Topic Area that this question is:
- Answered by: tonnybrandt(25 pts), Nosterdamus(25pts)

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Thanks!

Nosterdamus
Avatar of c_schou

ASKER

Hi Nosterdamus and tonnybrandt
Thank you both for all your help, all-though it didn't solve my problem on the windows 2000 platform. I had to keep a partition with win98 just for this old DOS program...
Again Thank you very much
Sincerely
Christian
Per recommendation, force-accepted by
Netminder
CS Moderator

Nosterdamus: points for you at https://www.experts-exchange.com/jsp/qShow.jsp?ta=win2k&qid=20303305