werner 007 wrote: > > Does anybody know a easy way to convert url encoded strings (like "%20") > to normal characters? > > Btw: Nice would be Conv$("%20", url, utf8). > > > Regards, werner(007) >
Ok, i got the answer by my self. The chars of not printable and non-ascii are represented as Hex. To convert it back: PUBLIC FUNCTION url_encode(url_string AS String) AS String DIM i AS Integer FOR i = 0 TO 32 url_string = Replace(url_string, "%" & Hex$(i, 2), Chr(i)) NEXT FOR i = 127 TO 255 url_string = Replace(url_string, "%" & Hex$(i, 2), Chr(i)) NEXT RETURN url_string END -- View this message in context: http://www.nabble.com/URL-encoding-%22-20%22-tp21216641p21216909.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user