[fpc-pascal] Weird string behavior
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jul 25 22:25:59 CEST 2016
On 23/07/16 13:31, Petr Kohut wrote:
> Hello,
> here are results:
Thanks a lot. Could you test one more? I think I will have all
information I need then.
Jonas
{$APPTYPE CONSOLE}
type
tcp866 = type ansistring(866);
var
s1, s2, s3: tcp866;
begin
s1:='abc';
setcodepage(rawbytestring(s1),65001,false);
s2:='def';
setcodepage(rawbytestring(s2),437,false);
s3:=s1+s2;
Writeln('DefaultSystemCodePage = ',DefaultSystemCodePage);
Writeln('s3 = "', s3, '" cp = ', StringCodePage(s3));
Readln;
end.
More information about the fpc-pascal
mailing list