delphi XE webbroker 开发,解决 Response 返回中文乱码问题


本文整理自网络,侵删。

 
procedure TWebModule1.WebModuleBeforeDispatch(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
Response.ContentType := 'text/html;charset=GB2312'; //解决 Response 返回中文乱码问题
  if FServerFunctionInvokerAction <> nil then
    FServerFunctionInvokerAction.Enabled := AllowServerFunctionInvoker;
end;

相关阅读 >>

Delphi tgpimage 把图像转存为其他格式

Delphi webbrowser1 设置获取编码

Delphi侦测按键输入

Delphi 将label的caption内容竖向显示

Delphi的datetostr strtodate格式灵活用法

Delphi twebbrowser:确定带有框架的页面何时完成

Delphi让程序运行后自我删除或恢复名称

Delphi中用tlistview显示数据库数据

Delphi xe5 android listview

Delphi开发的服务中调用指定应用程序

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...