tcpstr12.pp 352 B

123456789101112131415161718
  1. program tcpstr12;
  2. // check that 'test' constants assigned to ansistring variables have different codepage
  3. {$mode delphi}
  4. type
  5. cp866 = type AnsiString(866);
  6. var
  7. A: cp866;
  8. B: AnsiString;
  9. begin
  10. B := 'test';
  11. // if StringCodePage(B) <> DefaultSystemCodePage then
  12. // halt(1);
  13. A := 'test';
  14. if StringCodePage(A) <> 866 then
  15. halt(2);
  16. end.