Arno,
... try the following code and let me know how it works for you,
The code works for me. But should not the first overload directive be inside
the conditional define?
Regards Bjørnar
--
To unsubscribe or change your settings for TWSocket mailing list
please goto
Bjørnar Nielsen wrote:
Arno,
... try the following code and let me know how it works for you,
The code works for me. But should not the first overload directive
be inside the conditional define?
Yes, it's better inside, corrected. Just updated the svn repository.
--
Arno Garrels
--
Arno,
Would you expect a correct result as well if you base64-decoded a
quoted-printable encoded string?
No, I agree. But the problem is not the decoding itself but the way
Unicode-chars and Ansi-chars are treated.
This is the line where the problem lies:
MyAnsichar :=
Bjørnar Nielsen wrote:
Arno,
Would you expect a correct result as well if you base64-decoded a
quoted-printable encoded string?
No, I agree. But the problem is not the decoding itself but the way
Unicode-chars and Ansi-chars are treated.
This is the line where the problem lies:
Arno,
The only workaround that comes to my mind was another overload that takes
a RawByteString instead of string. I won't use AnsiString because implicit
ansi string
casts must be avoided too.
That would work for me. I'm not very familiar with the use of RawByteString,
but I made
Bjørnar,
Arno,
The only workaround that comes to my mind was another overload that
takes
a RawByteString instead of string. I won't use AnsiString because
implicit ansi string casts must be avoided too.
That would work for me. I'm not very familiar with the use of
RawByteString, but
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 :
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
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;
begin
Str :=
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
Ã...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
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
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
13 matches
Mail list logo