我用 IdEncoderMIME 加密带中文都是乱码...
无语中..
百度 谷歌...搜遍了

解决方案 »

  1.   


    uses
      EncdDecd;function ThunderEncode(HttpURL: string): string;
    begin
      Result := '';
      if HttpURL = '' then
        Exit;
      HttpURL := 'AA' + HttpURL + 'ZZ';
      Result := 'thunder://' + EncodeString(HttpURL);
    end;
      

  2.   

    带中文可以了
    URL长点 后面的显示不出来....
    可有办法呀
      

  3.   


    URL:ftp://tv:[email protected]:88888/[迅雷下载www.csdn.net]龙门飞甲TS枪版.rmvb
    转出来是:thunder://QUFmdHA6Ly90djp0dkB4bGguY3Nkbi5uZXQ6ODg4ODgvW9G4wNfPwtTYd3d3LmNzZG4ubmV0XcH6
    w8W3ybzXVFPHubDmLnJtdmJaWg==
    接出来是:ftp://tv:[email protected]:23352/[迅雷下载www.csdn.net]龙
      

  4.   

    有个回车符而已,去掉就行了
    function ThunderEncode(URL: string): string;
    begin
      Result := '';
      if URL = '' then
        Exit;
      URL := 'AA' + URL + 'ZZ';
      Result := 'thunder://' + EncodeString(URL);
      Result := ReplaceText(Result, #13#10, '');
    end;function ThunderDecode(ThunderURL: string): string;
    begin
      Result := '';
      if SameText(LeftStr(ThunderURL, 10), 'Thunder://') then
      begin
        Result := DecodeString(Copy(ThunderURL, 11, Length(ThunderURL)));
        Delete(Result, 1, 2);
        Delete(Result, Length(Result) - 1, 2);
      end;
    end;