I have a problem displaying text correctly under Windows 10, using TCC 19 This affect my help screens in BTM files.
To illustrate the problem, I create a simple text file, code page is 437. See the difference between CMD.EXE and TCC.EXE in the attached picture.
How to get the same output as CMD.EXE
On the console I must use code page 437 and nothing else. Everything must work the same as TCC 11 (on an older system)
In CMD.EXE, use type tmp.txt and ik looks ok.
Unter TCC.EXE the same command does not dislay code page 437
I can not figure out how get everything work as before TCC 19
I have the same "incorrect" result in Win AND TCC Console. Here this is logical because I set the Win Console to CP 1252 too (easier to handle all such things). Of course then such files has to be created and saved in CP 1252 - THEN all looks identical in Win and TCC Console AND even in native Win programs too.
PS: I have the Unicode Output NOT enabled for TCC.
I did not create files. I have a lot of BTM files, created in the past. TCC and old 4NT have a nice structure TEXT ->> ENDTEXT used to display help. Rewriting all BTM-files is not an option.
I simply need a correct use of old OEM code pages.
Oeps.. I forgot the other thing you asked.
Font does not make any difference. I can use Lucida Console, Consolas or Raster fonts. Alle have the same effect. Under Windows 10 preview build 14352 (another machine) there are several extra fonts. Same effect.
I did a little poking around in Windows 7 + tcc 19.0 + 4nt 8.0 32-bit etc. The examples by Ruud Uphoff are cp 850 for tcc and cp 437 for cmd. 850 might actually be ansii (1252), in either case, it's not 437.
437: dos editors (edit, qbasic, ibm e), cmd, command /c, v, view, lister (from www.ghisler.com - free), list (v Buerg)
850: tcc (type, list), metapad, notepad, command (type)
The active code page in the TCC, CMD and COMMAND are 850, but setting this to 437 seems to have no effect.
Lister gives ansi/oem/variable, giving 437 only for oem
It seems that the 'default' is not being taken as the OEM font but rather the System code page. You can see this in the view menu (view tmp.txt, then view|character encoding|....).
And, as you probably know, Rex, ASCIIToUnicode() has changed its behavior. In v16, it correctly shows the test file in question (with box-drawing characters). In v19, it's as described above ... apparently (?) using the ANSI code page instead of GetConsoleOutputCP().