D7和XE5 的TSearchRec 有关问题,取得文件夹的中文文件名乱码

D7和XE5 的TSearchRec 问题,取得文件夹的中文文件名乱码
D7和XE5 的TSearchRec 问题,取得文件夹的中文文件名乱码

Delphi XE5
{ Generic filename type }

  TFileName = type string;

{ Search record used by FindFirst, FindNext, and FindClose }

  TSearchRec = record
  private
    function GetTimeStamp: TDateTime;
  public
{$IFDEF MSWINDOWS}
    Time: Integer platform deprecated;
{$ENDIF MSWINDOWS}
{$IFDEF POSIX}
    Time: time_t platform;
{$ENDIF POSIX}
    Size: Int64;
    Attr: Integer;
    Name: TFileName;
    ExcludeAttr: Integer;
{$IFDEF MSWINDOWS}
    FindHandle: THandle platform;
    FindData: TWin32FindData platform;
{$ENDIF MSWINDOWS}
{$IFDEF POSIX}
    Mode: mode_t platform;
    FindHandle: Pointer platform;
    PathOnly: string platform;
    Pattern: string platform;
{$ENDIF POSIX}
    property TimeStamp: TDateTime read GetTimeStamp;
  end;

D7
{ Generic filename type }

  TFileName = type string;

{ Search record used by FindFirst, FindNext, and FindClose }

  TSearchRec = record
    Time: Integer;
    Size: Integer;
    Attr: Integer;
    Name: TFileName;
    ExcludeAttr: Integer;
{$IFDEF MSWINDOWS}
    FindHandle: THandle  platform;
    FindData: TWin32FindData  platform;
{$ENDIF}
{$IFDEF LINUX}
    Mode: mode_t  platform;
    FindHandle: Pointer  platform;
    PathOnly: String  platform;
    Pattern: String  platform;
{$ENDIF}
  end;
如位大侠能帮忙解决呢?
------解决方案--------------------
TFileName = type string;
文件名类型定义为 AnsiString 
不过系统有可能是 Unicode 的
具体,要说明使用环境(操作系统),并且要上代码
只看你帖子上的这些,不能判断