[fpc-pascal] Fwd: URIParser.Unescape

Thomas Kurz fpc.2021 at t-net.ruhr
Tue Aug 26 11:43:14 CEST 2025


Edit:

On the other hand, `HttpProtocol.HTTPEncode` does never encode spaces to `%20`, regardless of the `aSpacesAsPlus` parameter. (If set to `false`, spaces keep being spaces.)


----- Original Message ----- 
From: Thomas Kurz via fpc-pascal <fpc-pascal at lists.freepascal.org>
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Sent: Tuesday, August 26, 2025, 11:23:57
Subject: [fpc-pascal] URIParser.Unescape

Hello,

I have seen that the `URIParser.Unescape` function handles only percent encoding. But it is called within the `ParseURI` function to decode the parameters:

if Decode then
      Result.Params:=Unescape(Result.Params);
      
So I wonder whether it'd have to decode plus signs to spaces, as well? At least I stumbled upon this problem after having received an URL parameter in the style `param+name=param+value`.

Thanks,
Thomas

_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list