I'm using a web server based on the ICS 8 sample code. It appears to render UTF-8 correctly when the source is a fixed part of a web page, but not when I generate the content dynamically. Specifically, I am using a dynamically generated string as an Ajax response - this is the relevant part of the Delphi code:
Flags := hgWillSendMySelf;
s := 'Chaitén / αυτό είναι Îνα τεστ';
TMyHttpConnection(Client).AnswerString(Flags, '', '', '', s);
Log('Unicode response: ' + s);
Result := TRUE;
The unicode is correctly rendered in the log file.
I have put a very short example file at http://www.amberel.com/test/unicodetest.htm
At the top of the page is a static paragraph that displays the unicode correctly. If you click the Ajax button, the response is shown as Ajax response: Chait�n / a?t? e??a? ??a test
The dynamically generated string can be accessed directly from the address bar of the browser using http://www.amberel.com/test/ajaxunicodetest.htm
In this case I see Chaitén / a?t? e??a? ??a test - the first part appears correct but the second part not - I think this is because that, while the first part is UTF-8, it coincidentally happens that the same character appears in the single byte iso-8859-1 character set.
I am using ICS 8.41, it's not the latest version because when I tried to use a later version, the SSL stopped working. If it is necessary to use the latest version for this to work, I will have another try at the update.
I've spent a lot of time making no headway on this - this stuff is far removed from my speciality! Any idea for fixing it, or even just ideas of how to narrow the problem down, gratefully received.
Rgds, Andy