#1 2016-09-28 13:36:08

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Decode plus issue

"Javascript"
encodeURIComponent('TDsIInOXIfj+yvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw==') ==>

"TDsIInOXIfj%2ByvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw%3D%3D"

"Delphi"
http://localhost:8080/root/MyServiceFree.SignUp?userPass=TDsIInOXIfj%2ByvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw%3D%3D


function TMyServiceFree.SignUp(userPass: RawUTF8): RawJSON;
var
  JSON: RawUTF8;
begin
 JSON := UrlDecode('TDsIInOXIfj%2ByvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw%3D%3D');

WriteLn(JSON); --> 
TDsIInOXIfj+yvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw==

WriteLn(UrlDecode(userPass)); -->
TDsIInOXIfj yvJ4XmSN7tfFa4eaYnY8D2DDwiA3cyD71eprc3OA7aBbGhWuLZml0ublwrxfDmmERKML2wfGRw==

+ is missing.

Any idea?

Offline

#2 2016-09-28 13:45:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Decode plus issue

I do not understand what you are writing.

I guess that userpass is ALREADY decoded, when retrieved from the URI.

Offline

#3 2016-09-28 14:51:55

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Re: Decode plus issue

I must've drunk two liters of caçacha. I've been posting a lot of non-sense posts.

Offline

#4 2016-09-28 19:36:13

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Decode plus issue

No problemo.
smile

Offline

Board footer

Powered by FluxBB