mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-27 19:13:44 +02:00
26 lines
428 B
ObjectPascal
26 lines
428 B
ObjectPascal
program tcpstr13;
|
|
|
|
// check that copy operation converts from 866 to DefaultSystemCodePage encoding
|
|
|
|
{$mode delphi}
|
|
|
|
{$ifdef unix}
|
|
uses
|
|
{$ifdef darwin}iosxwstr{$else}cwstring{$endif};
|
|
{$endif}
|
|
|
|
type
|
|
ts866 = type ansistring(866);
|
|
|
|
var
|
|
s: ts866;
|
|
a: ansistring;
|
|
begin
|
|
s:='abc'#$00A9#$00AE'123';
|
|
// if s[4] <> 'c' then
|
|
// halt(1);
|
|
a:=copy(s,1,4);
|
|
if stringcodepage(a)<>DefaultSystemCodePage then
|
|
halt(2);
|
|
end.
|