[Lazarus] FPC 2.7.1 and console output
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Thu Dec 4 08:10:00 CET 2014
Mattias Gaertner schrieb:
> On Wed, 03 Dec 2014 16:06:28 +0100
> Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>
>> [...]
>> Otherwise the conversion to the actual console CP is working, because
>> the fpc_Write_Text_xyz routines use RawByteString arguments, so that
>> they have to check the dynamic string encoding. Ordinary subroutines,
>> that use other string argument types, will almost produce random
>> results, because AnsiStrings tend to have a dynamic encoding different
>> from the expected (static) encoding.
>
> What example are you referring to?
See AnsiUpperCase.
>> [...]
>> Using UTF-8 sources *and* {$codepage UTF8} cures the unusable CP_ACP
>> encoding of string literals, they are converted as expected in immediate
>> output or when assigned to any AnsiString. Other settings cannot work
>> with the current handling of AnsiString :-(
>
> CP_ACP is usable with the DefaultSystemCodepage.
Currently AnsiUpperCase etc. will work on Windows *only* if
DefaultSystemCodePage matches the WinAPI CP_ACP.
DoDi
More information about the Lazarus
mailing list