Доброго времени суток!
Возникает проблема кодировки русских символов при использовании компонентов Indy 10.5.7, как я знаю в более ранних версиях было все ОК
Использую компонент TIdHTTPServer. Клиент при запросе страницы видит "козяблики", вместо русского текста

. Как исправить данную проблему?
Вод код сервера, если он чем-то может помочь:
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | procedure TWebServerForm . HTTPServerCommandGet(AContext: TIdContext;
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
RequestFileName, IndexFileName: String ;
begin
AResponseInfo . Server := 'ncm_web_server' ;
AResponseInfo . CacheControl := 'no-cache' ;
RequestFileName := AnsiLowerCase(ARequestInfo . Document);
try
if RequestFileName = '/' then RequestFileName := '/index.php' ;
if FileExists(ncm_WebSitePath + RequestFileName) then
begin
AResponseInfo . ContentStream := TFileStream . Create(ncm_WebSitePath + RequestFileName, fmOpenRead);
AddServerEvent( 'файл "' + RequestFileName + '" успешно отправлен на "' + AContext . Binding . PeerIP + '".' );
end
else
begin
AResponseInfo . ContentStream := TFileStream . Create(ncm_WebPagesPath + 'notfound.php' , fmOpenRead);
AddServerEvent( 'файл "' + RequestFileName + '" не найден на локальном компьютере.' );
end ;
except
on E: Exception do
begin
AddServerEvent(E . Message);
end ;
end ;
end ;
|
AddServerEvent - это запись текста в лог.
Заранее спасибо!