Unicode

Top  Previous  Next

New features since Delphi 7 > Unicode

Delphi2C# is able to process Delphi files which uses non ANSI characters for identifiers or in comments. For example:

 

 

 

unit Unicode;

 

interface

 

 

(* Delphi2C# 会 用 Unicode *)

 

type 

 

  公司 = record

    名字: string;

    地址 : string;

  end; 

 

 

implementation 

 

  // 写 公司 的 性质 (xìngzhì)

  procedure 写(A公司 : 公司);

  begin

    WriteLn(A公司.名字);

    WriteLn(A公司.地址);

  end; 

 

 

 

end.

 

becomse to:

 

using static Unicode.UnicodeClass;

using System;

using static System.SystemClass;

 

namespace Unicode

{

 

public struct 公司

{

  public string 名字;

  public string 地址;

  public static 公司 CreateRecord(){return new 公司();}

};

public class UnicodeClass

{

 

/* Delphi2C# 会 用 Unicode */ 

 

  // 写 公司 的 性质 (xìngzhì)

 

public static void 写(公司 A公司)

{

  WriteLn(A公司.名字);

  WriteLn(A公司.地址);

}

 

} // UnicodeClass

 

}  // namespace Unicode

 

 

 

 

 



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content