问题
When I send some Cyrillic text in the web site that text is displayed with "?????????".... Here is my sending function:
http := TIDHttp.Create(nil);
http.HandleRedirects := true;
http.ReadTimeout := 5000;
http.Request.ContentType:='multipart/form-data';
param:=TIdMultiPartFormDataStream.Create;
param.AddFormField('adtitle','Текст на кирилица');
param.AddFormField('area','Текст явергсдфсдфадфас');
http.Post('http://www.example.com/',param);
回答1:
Try like this:
param.AddFormField('adtitle', 'Текст на кирилица', 'utf-8').ContentTransfer := '8bit';
param.AddFormField('area', 'Текст явергсдфсдфадфас', 'utf-8').ContentTransfer := '8bit';
来源:https://stackoverflow.com/questions/6322442/how-to-send-cyrillic-data-with-indy10-delphi