求 迅雷加密url中文地址 代码,该如何解决

求 迅雷加密url中文地址 代码
我用 IdEncoderMIME 加密带中文都是乱码...
无语中..
百度 谷歌...搜遍了

------解决方案--------------------
有个回车符而已,去掉就行了

Delphi(Pascal) code

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;