Hallo,
das hast Du gesucht, oder
Delphi-Quellcode:
Function URLEncode(Value : String) : String;
Var I : Integer;
Begin
Result := '';
For I := 1 To Length(Value) Do
Begin
If Pos(UpperCase(Value[I]), ValidURLChars) > 0 Then
Result := Result + Value[I]
Else
Begin
If Value[I] = ' ' Then
Result := Result + '+'
Else
Begin
Result := Result + '%';
Result := Result + IntToHex(Byte(Value[I]), 2);
End;
End;
End;
End;