Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

Project from Ansi to Unicode

  Alt 8. Apr 2014, 16:06
Delphi-Version: 2010
I found nice unit to work with torrents:

Code:
http://torrentspy.cvs.sourceforge.net/viewvc/torrentspy/TorrentSpy-0.2-delphi/src/
So, TorrentFile.pas and included ones are not Unicode ready. I can't make it working with D2010+ (I only can exchange MessageDigests.pas with DEC). Could you help, please?

Delphi-Quellcode:
// Test code: Ansi - oke, Unicode - empty

var
  T: TTorrentFile;
  F: TStream;
begin
  if OpenDialog1.Execute then
  begin
    T := TTorrentFile.Create;
    F := TFileStream.Create(OpenDialog1.FileName, fmOpenRead);
    try
      T.Load(F);
      ShowMessage(T.Announce + #13#10 + T.CreatedBy + #13#10 + T.CreationDateAsString);
    finally
      T.Free;
      F.Free;
    end;
  end;
end;
  Mit Zitat antworten Zitat