[twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Bjørnar Nielsen
Proposal to a fix on bug in UrlDecode in OverbyteIcsUrl.pas and OverbyteIcsHttpSrv.pas. When calling the function like this: Memo2->Text = UrlDecode("Ã...ge",CP_ACP,false); // Ã...ge is UTF8encoding of Åge The resulting text in Memo2 is "Ã&ge" and is impossible to UTF8-dekode back to the origin

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread andy
Dear bjor...@sentinel.no, I will be away on holiday from 27/7/2010 until 10/8/2010 and will be unable to deal with your recent message regarding `[twsocket] Found a bug and made a fix in function UrlDecode`. For technical support enquiries please email supp...@ietgroup.com or telephone 01442

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Bjørnar Nielsen
A little change inside the function also must be made to make it work: The line with htoi2 need a little change, the complete code is this: function UrlDecode(const S : AnsiString; SrcCodePage: Cardinal = CP_ACP; DetectUtf8: Boolean = TRUE) : String; var I, J, L : Integer; U8Str : Ans

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread andy
Dear bjor...@sentinel.no, I will be away on holiday from 27/7/2010 until 10/8/2010 and will be unable to deal with your recent message regarding `Re: [twsocket] Found a bug and made a fix in function UrlDecode`. For technical support enquiries please email supp...@ietgroup.com or telephone 014

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Arno Garrels
Bjørnar, > When calling the function like this: > Memo2->Text = UrlDecode("Ã...ge",CP_ACP,false); // Ã...ge is UTF8encoding of > Åge "Ã...ge" is not a valid URL encoded string. "Åge" URL encoded was: "%C3%85ge" //UTF-8 "%C5ge" //Windows-1252 Try this: {code} var Str: string; beg

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread andy
Dear arno.garr...@gmx.de, I will be away on holiday from 27/7/2010 until 10/8/2010 and will be unable to deal with your recent message regarding `Re: [twsocket] Found a bug and made a fix in function UrlDecode`. For technical support enquiries please email supp...@ietgroup.com or telephone 014

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Bjørnar Nielsen
> "Ã...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 have a webserver that works against different clients, and not all of the clients url-encode data in the url. But all of the clients UTF8-encode data. That

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread andy
Dear bjor...@sentinel.no, I will be away on holiday from 27/7/2010 until 10/8/2010 and will be unable to deal with your recent message regarding `Re: [twsocket] Found a bug and made a fix in function UrlDecode`. For technical support enquiries please email supp...@ietgroup.com or telephone 014

[twsocket] Somebody should block "andy at ietgroup.com" to stop his auto-answerer flooding the list

2010-08-05 Thread Anton S.
Subj -- Anton -- 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

Re: [twsocket] Found a bug and made a fix in function UrlDecode

2010-08-05 Thread Arno Garrels
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 anyt