
Your output will be "ÿ" which is Windows-1252 or Unicode character 255 or 0xFF. Now run "powershell -Command "Get-Content text.txt"".

That's code page 437's extended ASCII non-breaking space followed by carriage return and line feed. Now type "powershell.exe -Command "::ReadAllBytes('C:\text.txt')"". Hit F6 or Ctrl+Z and hit enter to finish the file. Run "copy con C:\text.txt" to create a new file from the console input. Run "chcp" and it should tell you that the active code page is 437. However, even on Windows 10 you can still get to a place where you're using the original code page of 437.įire up cmd.exe. Windows is converting extended ASCII 255 from code page 437 to either Windows-1252's non-breaking space, which is 0xA0 or 160, or UTF-16-LE's code page where non-breaking space is 0x00A0. On those code page, non-breaking space is 0xA0 (160).

The problem you're having is that you're using Windows, which uses either Windows-1252 or UTF-16-LE (Windows Unicode). As you say, DOS's code code page is 437, and character 255 is a non-breaking space on code page 437. Everything above that is extended ASCII specific to a code page.
