delphiXE 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;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章