Console output with unit Crt always using ANSI codepage
Original Reporter info from Mantis: Tomas @xhajt03
-
Reporter name: Tomas Hajny
Original Reporter info from Mantis: Tomas @xhajt03
- Reporter name: Tomas Hajny
Description:
There is no possibility to perform output using other codepages than the current ANSI codepage (e.g. using the traditional "OEM" aka IBM codepages is not possible any longer, which is especially problematic with a TP/BP compatibility unit Crt since OEM aka IBM codepages were exactly those used with TP/BP compiled programs under MS-DOS).
Steps to reproduce:
Open a command prompt.
Run 'chcp 437'.
Run the following program:
begin
WriteLn ('Square root: ', Chr (251));
end.
Now run the following program:
uses
Crt;
begin
WriteLn ('Square root: ', Chr (251));
end.
You see that the output differs depending on whether unit Crt is used or not. You can also see that the square root character (ASCII 251 in the original IBM codepage 437) is properly displayed in the first case but not in the second case.
Mantis conversion info:
- Mantis ID: 16846
- OS: MS Windows
- OS Build: Windows XP SP3
- Platform: Win32 (or Win64)
- Version: 2.4.0
- Monitored by: » @xhajt03 (Tomas Hajny)