char by char copying of string broken
Original Reporter info from Mantis: BeniBela @benibela
-
Reporter name: Benito van der Zander
Original Reporter info from Mantis: BeniBela @benibela
- Reporter name: Benito van der Zander
Description:
You could always copy a string char by char, but now it is broken, because fpc wants to do some encoding conversions
Steps to reproduce:
This prints 'äöü' with r37480, but '??????' with r40681:
program Project1;
{$mode objfpc}{$H+}
uses cwstring;
var
test: String;
function slowcopy(s: string): string;
var
i: Integer;
begin
result := '';
for i:=1 to length(s) do
result := result + s[i];
end;
begin
test := 'äöü';
test := slowcopy(test);
writeln(test);
end.
Mantis conversion info:
- Mantis ID: 34776
- OS: linux
- Build: r40681
- Platform: amd64
- Version: 3.3.1
- Monitored by: » @martok (Martok), » AntonK (Anton Kavalenka)