mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 07:19:35 +02:00

- don't parse '(' token after the type declaration inside the type block - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility - fix tests to use "type AnsiString(codepage)" git-svn-id: trunk@19148 -
27 lines
456 B
ObjectPascal
27 lines
456 B
ObjectPascal
{$CODEPAGE cp1251}
|
|
// file encoding is cp1251
|
|
type
|
|
Cp866String = type AnsiString(866);
|
|
Cp1251String = type AnsiString(1251);
|
|
|
|
procedure WriteString(const s: RawByteString);
|
|
begin
|
|
Write(StringCodePage(s), ' : ');
|
|
WriteLn(s);
|
|
end;
|
|
|
|
var
|
|
u : UnicodeString;
|
|
c1251: Cp1251String;
|
|
c866: Cp866String;
|
|
begin
|
|
c1251 := 'Ïðèâåò';
|
|
WriteString(c1251);
|
|
u := c1251;
|
|
WriteString(u);
|
|
c866 := c1251;
|
|
c866 := c866 + c1251;
|
|
WriteString(c866);
|
|
end.
|
|
|