httpencode编码

httpencode编码

uses System.NetEncoding

  var s: string := TNetEncoding.URL.Encode('123');  //123
  var s2: string := TNetEncoding.URL.Encode('abcd'); //abcd
  var s3: string := TNetEncoding.URL.Encode('ab1cd2'); //ab1cd2
  var s4: string := TNetEncoding.URL.Encode('汉字a2'); //%E6%B1%89%E5%AD%97a2
  var s5: string := TNetEncoding.URL.Decode('%E6%B1%89%E5%AD%97a2'); //汉字a2

  

posted @ 2019-07-22 19:15  delphi中间件  阅读(1548)  评论(0编辑  收藏  举报