1

How do I get Windows 10 to get CodePages to correctly display?

STOP PRESS

More investigation (creating echo of x80-ff) shows Windows is fine, it's a GAWK print (or terminal/driver) issue As shown in following screenshot of GAWK then ECHO of CP737 ...

gawk then echo off x80-FF

There are some non-ASCII and non-English characters that I want that are available in different Windows Codepages, but they don't display properly in Windows 10 CMD windows (Microsoft Windows [Version 10.0.17134.590]). The font used is Courier New (16pt). NB Code used is faulty but PoC is correct

The displayed blocks 80-FF almost (but not quite) duplicate CP1252 except from CP737 which is surprising bare, and shows the substitution char '?' for most positions.

What magic do I invoke to make the code pages more closely resemble what they should be? For reference I've been looking at Code page 437 and similar.

CodePage 437 CodePage 737 CodePage 850 CodePage 860 CodePage 869 CodePage 1252

The code to generate the character blocks is from gawk:

# gawk -f HiAscii.awk
BEGIN {
 #SEP = "><" # insert " SEP " into strings
 print "   <0123456789ABCEF>" #yeah, D is missing, but principle okay
 for(hi = 0x80; hi < 0x100; hi += 0x10){
  line = sprintf("%X <", hi)
  for(lo = 0x01; lo < 0x10; ++lo){ #yeah, these limits are wrong but screenshots already done
   line = line sprintf("%c%s", hi + lo, "")
  }
  print line 
 }
 print "   <0123456789ABCEF>" # yeah D missing
 print
 exit
}

and the batch file to run is

@ver
@echo "437 = DOS Latin US"
@chcp 437
@gawk -f HiAscii.awk
@echo "737 = DOS Greek"
@chcp 737
@gawk -f HiAscii.awk
@echo "850 = DOS Latin 1"
@chcp 850
@gawk -f HiAscii.awk
@echo "860 = DOS Portugese"
@chcp 860
@gawk -f HiAscii.awk
@echo "869 = DOS Greek2"
@chcp 869
@gawk -f HiAscii.awk
@echo "1252 = Super ISO8859-1"
@chcp 1252
@gawk -f HiAscii.awk
Community
  • 1
  • 1
brewmanz
  • 1,181
  • 11
  • 17
  • did you try with other font on the terminal. Limitation of this kind is generally there. – NeronLeVelu Mar 01 '19 at 06:57
  • @neronLeVelu I displayed the x80-xff characters with Courier New (16pt), both via GAWK terminal driver (mainly '?') and CMD ECHO (perfect) so font not an issue - screenshot added at top of post just a few hours before your reply. But GAWK terminal driver definitely looking suspect. – brewmanz Mar 02 '19 at 21:45

0 Answers0