Bjørnar, >> "Ã...ge" is not a valid URL encoded string. > > I know, but it is valid UTF8. I think trying to url-decode it should > not break the string.
I do not think so. Would you expect a correct result as well if you base64-decoded a quoted-printable encoded string? An URL containing anything else than characters from the printable 7-bit ASCII range is invalid. Just like Base64Decode requires properly encoded data to return correct results UrlDecode requires a valid URL to work correctly. This requirement has the advantage that it works with "string" when both "string" maps to UnicodeString and to AnsiString because no implicit string cast will corrupt the string if an AnsiString is passed and "string" maps to UnicodeString. However I must admit that it is somehow breaking behavior when you port your apps to Unicode. > I have a webserver that works against different > clients, and not all of the clients url-encode data in the url. Those clients definitively violate RFC. > But > all of the clients UTF8-encode data. That means that if I try to > url-decode utf8-data that’s not url-encoded, the data gets messed up > and I had a problem until I made this fix. Can't you use your own custom function then? -- Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be