I would like to report the following bug:
Currently URLDecoder does not support to decode UTF8 %-encoded URLs and URLEncoder can't encode to 2-byte %-encoded URLs.
Example of the current correct situation:
Code: Select all
URLEncoder("Ä") = %C4
URLDecoder("%C4") = Ä
Code: Select all
URLEncoder("Ä") = %C3%84
URLDecoder("%C3%84") = Ä
Code: Select all
URLEncoder("Ä") = %C4
URLEncoder("Ä", #PB_Ascii) = %C4
URLEncoder("Ä", #PB_UTF8) = %C3%84
Code: Select all
URLDecoder("%C4") = Ä
URLDecoder("%C3%84") = Ä
Maybe URLDecoder should also get an additional parameter to allow the decoding format being forced.
I hope this is understandable, more information can be found here:
http://purebasic.fr/english/viewtopic.php?t=35747
For testing run the following code in ASCII or Unicode mode:
Code: Select all
Debug URLDecoder("%C4")
Debug URLDecoder("%C3%84")
Thanks in advance!