I was trying to make my own webserver using Indy, for some sort of webpage. In my native language I frequently use the 'Ő' and 'Ű' characters, which would be fine, but for some reason, after the html file has been sent to the browser by the server, these characters get replaced with 'O' and 'U'. It's annoying me for like a week now, and I can't figure out, why does this keep happening. What do I need to set on the server, so it sends the page correctly? Thanks for any help!
You just need to define the responding charset like that:
procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext;
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
begin
AResponseInfo.ContentType := 'text/plain';
AResponseInfo.CharSet := 'utf-8';
AResponseInfo.ContentText := 'Hallo Web ŐŰ';
end;