>> Interesting !!!
>> So POST and GET data, when sent to a host, are not unicode ?
> They are not sent as UTF-16 Unicode, correct.
>> And so what I provide to the component when I do a GET, in unicode, is
>> converted in the component to something else (UTF 8 ?)
> Yes, in V7 a GET request is converted to UTF-8 first the URL-encoded,
> so the component user must not care about the encoding (see functions
> UrlEncode/UrlDecode in OverbyteIcsUrl.pas), in V5 and V6 the AnsiString
> with current system code page was URL-encoded as is.

I converted to UTF before POSTing and was successful.
Next I tried a special character "ù", because in UTF8 this codepoint is made 
up from 2 bytes.
This failed, and the POSTed data, appears to contain 2 strange characters 
instead of the sent "ù"

When I converted to AnsiString "ù" was sent OK, *but* in my code page this 
is of course available and a single byte.

So I wondered if UTF8 actually works but ... based on what you said ... read 
further ...

> With POST requests however the send stream is sent as is and the
> component user is responsible to format and encode the stream content
> properly. Posted data may, for example, contain multple parts all with
> a different Charset and Content-Transfer-Encoding part-header.

So I suppose that if I want to send UTF8 I need to put a header before the 
data first ?

Do you know what this header should be for UTF8 ?
Is there an ICS function for it ?

Should I URL encode the POST data as well ?
Is there an ICS function for it ?

Do you URL encode the Unicode string then convert to UTF8 or vica versa ?

> The Absolute Minimum Every Software Developer Absolutely, Positively
> Must Know About Unicode and Character Sets (No Excuses!)
> http://www.joelonsoftware.com/articles/Unicode.html

I also read these and can suggest them:


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

Reply via email to