Attempt to display an Extended ASCII char in Windows 10 (with ZH-CN display language) causes 'Disk Write Error'
Original Reporter info from Mantis: FlierMate
-
Reporter name: Boo
Original Reporter info from Mantis: FlierMate
- Reporter name: Boo
Description:
I am running on Windows 10 Home in Chinese display language (System code page=936) but this user account is displaying English language. In other word, after the Windows has been reset to CJK display language, I changed it to English manually through Language Setting, but not sure why the language is not unified everywhere.
My attempt to Write an extended ASCII char (any value between 128~255) will causes Runtime Error 101 or Disk Write Error. However, in following circumstance, there will be error-free:
- WriteLn instead of Write
- Run from command prompt and by issuing this command (CHCP 437) before running the compiled EXE program
This is the error message if running the EXE program from command-line WITHOUT setting the code page to US OEM beforehand:
Runtime error 101 at $0040158F
$0040158F
$004072F7
Screenshot also showing the same error.
Please note that before running FP.EXE, I already set the code page to 437 so that the frame drawings are proper. But once I run a program inside the IDE, the code page would be lost.
Another note, using compiler directive to set the codepage to CP437 has no effect to the compile program.
Steps to reproduce:
I am not sure if you can find a CJK-lingual Windows 10 to test using the attached source code.
Basically, with or without the {$CODEPAGE CP437} , a simple one-liner "Write (Char(128))" will already cause Runtime Error 101.
Additional information:
{$CODEPAGE CP437}
begin
Write(Char(128));
end.
Mantis conversion info:
- Mantis ID: 38431
- OS: Microsoft Windows
- OS Build: 10.0.19041.746
- Build: i386-Win32
- Platform: Intel Duo T6600
- Version: 3.2.0