On Thu, 31 Mar 2016, Mattias Gaertner wrote:

On Thu, 31 Mar 2016 14:14:14 +0200 (CEST)
Michael Van Canneyt <mich...@freepascal.org> wrote:

[...]
> What happens on a Russian system cp1251 with a cp1251 AnsiString
> literal?
>
> writeln('Привет');

Careful, writing may change the codepage.

Yes, I know. That's why it is important that the compiler uses the
right conversion (CP1251 Win Cyrillic to CP866 DOS Cyrillic).

It depends on what the console codepage is set to.

Line 2657 of text.inc:

TextRec(f).CodePage:=WideStringManager.GetStandardCodePageProc(scpConsoleOutput);


If the compiler assumes CP1252 on a CP1251 system, then the writeln
should write garbage. Correct?

Not if the above assumption is correct.

But I'm just a student in this, Jonas is the Master who should be obeyed in 
such matters ;)

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to