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 将字符串转换为c-escape转义字符串格式

Delphi 实现php的urlencode编码效果

Delphi 优化mdb文件

Delphi中判断操作系统是否是windows7

Delphi html转义

Delphi 读写附加数据

Delphi 获取internet缓存文件

Delphi fdmemtable1建立缓存表

汇编基础知识

Delphi 类型映射及类型转换

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



打赏

取消

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

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

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

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

评论

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