Mein TIDURL kenn leider die URLDecode nicht. (alte
indy version)
wenn ich's so mache, gib't eine
AV:
Delphi-Quellcode:
function URLDecode(ASrc: string): string;
var
i: integer;
ESC: string[2];
CharCode: integer;
begin
Result := ''; {Do not Localize}
i := 1;
while i <= Length(ASrc) do begin
if ASrc[i] <> '%' then begin {do not localize}
Result := Result + ASrc[i]
end else begin
Inc(i); // skip the % char
ESC := Copy(ASrc, i, 2); // Copy the escape code
Inc(i, 1); // Then skip it.
try
CharCode := StrToInt('$' + ESC); {do not localize}
Result := Result + Char(CharCode);
except end;
end;
Inc(i);
end;
end;
UTF8Decode(URLDecode('unm%C3%B6glich'))