[Gambas-user] URL encoding "%20"

Doriano Blengino doriano.blengino at ...1909...
Wed Dec 31 08:59:15 CET 2008


Rob ha scritto:
> On Tuesday 30 December 2008 19:44, werner 007 wrote:
>   
>> First when i read your solution i was thinking "damn, i was lazy to make
>> a good job".
>> But then, we are not looking for single chars but for three at once.
>>     
>
> I misunderstood you, then.  URL encoding is replacing non-printable 
> characters with %xx.  URL DEcoding is replacing %xx with the original 
> non-printable character.  What I wrote will be fine for encoding and what 
> you wrote in this response will be fine if you rename the function 
> to "urldecode".
>
>   
...and don't forget that URL's ENcoding and DEcoding deals with other 
characters too (not merely the non-printable ones), for example the "%" 
itself should be encoded, and probably others (I don't have the specs at 
hands). The correct ENcoding of " % " (blank-percent-blank) is 
"%20%25%20", *not* "%20%%20"...

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list