Link to home
Start Free TrialLog in
Avatar of learningunix
learningunix

asked on

ascii characters

A character was written to filesystem using Windows Code Page 1251 (0xE4) but when read from DOS command prompt it is reading from MS-DOS code page 437 (0xE4) which is sigma.
Both the ascii value has different character. is there a way DOS can read the german character that was written using  Windows Code Page 1251 (0xE4)
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

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 learningunix
learningunix

ASKER

I created a file temp.txt and wrote couple of characters.   ää

from command prompt:

C:\>type temp.txt
This is printing sigma sigma character.

I tried chcp 1252,  still DOS will show sigma sigma instead of those german characters ää
Instead of using raster fonts in your DOS window, try using Lucida Console.  On my machine, this changes the sigma symbol to the ä character without any code page changes.
but is it possible to change programatically even if I use DOS window
also when I do the following from command prompt:
c:> notepad test.txt

the contents are:  ää

but if I do:
C:>edit test.txt
the contents are:  sigma sigma character.
Avatar of Qlemo
Code page 1251 is wrong, you have to use 1252, which is the Windows representation of the ISO code page. If you type the German Umlauts äöü in notepad, and then use
   chcp 1252
   type tst.txt
You should see them again. But only if you use a font capable of the code page - raster font isn't. And you can't change that from command line, you need to change the DOS prompt window properties to use Lucida Console.
You wrote that changing the code page was not enough, but have accepted that answer. May I ask why?