Home > Database > Mysql Tutorial > body text

xe2升级到xe6后 DataSnap Rest POST调用 参数中出现中文乱码

WBOY
Release: 2016-06-07 15:32:39
Original
1476 people have browsed it

修改 indy控件 IdCustomHTTPServer.pas procedure TIdHTTPRequestInfo.DecodeAndSetParams(const AValue: String); 方法中 新增一行 if CharSet='' then CharSet:='UTF-8'; LEncoding := CharsetToEncoding(CharSet); 或修改 indy控件 IdHTTPHeaderInfo.pas

修改 indy控件  IdCustomHTTPServer.pas

procedure TIdHTTPRequestInfo.DecodeAndSetParams(const AValue: String); 

  方法中 新增一行

    if CharSet='' then CharSet:='UTF-8';
    LEncoding := CharsetToEncoding(CharSet);

或修改 indy控件  IdHTTPHeaderInfo.pas 文件

替换里面FCharSet=‘’ 为 FCharSet=‘UTF-8’

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template