On mercredi 31 décembre 2008, Doriano Blengino wrote: > 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"...
You have CGI.Encode() and CGI.Decode() in the gb.web component that do what you are talking about. You can take the source code if you need. Regards, -- Benoit Minisini ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user