JSON

Http get json into string

字号+ 作者:H5之家 来源:H5之家 2015-09-30 08:07 我要评论( )

Im trying to get json response via HTTP GET method to a string but all I got is that: img src=\http://i.stack.imgur.com/DFblb.png\ alt=\enter image de

Try a newer version of Indy, Indy still supports non-Unicode Delphi.

The Indy TIdHTTP Get should automatially convert UTF-8 to Ansi (with limitations):

Internally, TIdHTTP.Get() decodes the server's UTF-8 data to Unicode, and then converts that to Ansi when returning it as an AnsiString in pre-2009 versions. That AnsiString uses the OS's default Ansi codepage, so yes, there is potential for data loss if the OS's current language does not support the Unicode characters being used by the server. ?f=7&t=3011

尝试一个新版本的印,印还支持非Unicode Delphi。

Indy tidhttp应该自动转换UTF-8 ANSI(有限制):

在内部,tidhttp。get()解码服务器的Unicode UTF-8数据,然后转换为ANSI 回国时,它作为一个AnsiString pre-2009中。,使用操作系统的默认ANSI AnsiString 代码页,所以是的,有数据的潜在损失如果OS的电流语言不支持Unicode字符被服务器使用。

 

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

相关文章
  • php CI 实战教程:[5]用curl获取json并解析

    php CI 实战教程:[5]用curl获取json并解析

    2016-02-26 17:00

  •  JSON入门级学习总结-JSON数据结构

    JSON入门级学习总结-JSON数据结构

    2016-02-25 11:05

  • Android解析Json速度最快的库:json

    Android解析Json速度最快的库:json

    2016-02-13 18:00

  • JavaScript转换与解析JSON方法实例详解第1/2页

    JavaScript转换与解析JSON方法实例详解第1/2页

    2016-02-10 21:25

网友点评
@