View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016846 | FPC | RTL | public | 2010-07-05 21:49 | 2013-04-11 08:41 |
Reporter | Tomas Hajny | Assigned To | Jonas Maebe | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Platform | Win32 (or Win64) | OS | MS Windows | ||
Product Version | 2.4.0 | ||||
Summary | 0016846: Console output with unit Crt always using ANSI codepage | ||||
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. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
FPCOldBugId | 0 | ||||
FPCTarget | |||||
Attached Files |
|
|
Of course my patch is problematic, but I couldn't find a better solution. Do you have any better idea? Note that the following program IMO should work in default Windows XP console (without changing fonts etc.): uses Crt; begin WriteLn ('Тестовая строка'); end. |
|
Your test sequence should indeed work as long as the test string in the source file is encoded using the same codepage as used in the particular console window. I'm no Win32 expert, so I don't know what would be the best way for making it to work right now apart from suggesting that Crt should preferably not fiddle with codepage settings at all. Moreover, I don't use / own any WinXX, so I can only play with it if I bring my work machine home and find some time for experimenting with it. Nevertheless, I'm willing to have a look at it if noone else solves it before, but it would surely take some time. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-07-05 21:49 | Tomas Hajny | New Issue | |
2010-07-05 21:49 | Tomas Hajny | FPCOldBugId | => 0 |
2010-07-05 21:52 | Tomas Hajny | Relationship added | related to 0006785 |
2010-07-05 22:03 | Maxim Ganetsky | Note Added: 0039048 | |
2010-07-05 22:05 | Maxim Ganetsky | Note Edited: 0039048 | |
2010-07-05 22:19 | Maxim Ganetsky | Note Edited: 0039048 | |
2010-07-07 23:43 | Tomas Hajny | Note Added: 0039123 | |
2010-07-10 14:38 | Jonas Maebe | Relationship added | duplicate of 0016064 |
2010-07-10 14:38 | Jonas Maebe | Duplicate ID | 0 => 16064 |
2010-07-10 14:38 | Jonas Maebe | Status | new => resolved |
2010-07-10 14:38 | Jonas Maebe | Resolution | open => duplicate |
2010-07-10 14:38 | Jonas Maebe | Assigned To | => Jonas Maebe |
2010-11-26 13:57 | Jonas Maebe | Status | resolved => closed |
2013-04-11 08:41 | Tomas Hajny | Relationship added | related to 0024257 |