Модераторы: Poseidon, Snowy, bems, MetalFan
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Проблема с модулем, не работает если в пути символы кирилицы 
:(
    Опции темы
IDontBelieveInSilence
Дата 31.12.2006, 00:02 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 50
Регистрация: 3.11.2006

Репутация: нет
Всего: нет



Здравствуйте. Есть модуль:

Код
unit cl_AVITag;
// -----------------------------------------------------------------------------

interface

uses
  Classes, SysUtils, sys_Files;

type
  vtAVIErrorCode =
  (
    ecNone,           // None
    ecOpenError,      // Error while opening file occurs
    ecReadError,      // Error while reading file occurs
    ecRIFFError,      // File does not match RIFF format
    ecSizeError,      // File size is smaller then supposed in RIFF header
    ecAVIError,       // File does not match AVI format
    ecStructureError, // Error in AVI structure detected
    ecCloseError,     // Error while closing file occurs
    ecWriteError      // Error while writing file occurs
  );

  { vtAVITag }

  vtAVITag = class(TObject)
    private
      { Private declarations }
      FFileName               : WideString;
      FErrorCode              : vtAVIErrorCode;
      INAM_Title              : String;
      IART_Director           : String;
      ICOP_Copyright          : String;
      IPRD_Product            : String;
      ICRD_CreationDate       : String;
      IGNR_Genre              : String;
      ISGN_SecondGenre        : String;
      ISBJ_Subject            : String;
      IKEY_Keywords           : String;
      ICMT_Comment            : String;
      IWRI_Writer             : String;
      IPRO_Producer           : String;
      IPDS_ProductionDesigner : String;
      IEDT_Editor             : String;
      ICDS_CostumeDesigner    : String;
      IMUS_Composer           : String;
      ISTD_ProductionStudio   : String;
      IDST_Distributor        : String;
      ICNT_Country            : String;
      ILNG_Language           : String;
      IRTD_Rating             : String;
      IPRT_Part               : String;
      IFRM_PartFrom           : String;
      ISTR_Starring           : String;
      ISFT_Software           : String;
      ITCH_Encoder            : String;
      IDIT_DigitationDate     : String;
      IWEB_InternetAddress    : String;
      ISRF_SourceForm         : String;
      IMED_Medium             : String;
      ISRC_Source             : String;
      IARL_ArchivalLocation   : String;
      ICMS_ComissionedBy      : String;
      IENG_Enginer            : String;
      ICRP_Croped             : String;
      ISHP_Sharpness          : String;
      IDIM_Dimensions         : String;
      ILGT_Lightness          : String;
      IDPI_Resolution         : String;
      IPLT_Palette            : String;
    public
      { Public declarations }
      constructor Create(const FileName: WideString);
      function ReadTag: Boolean;
      procedure ClearTag;
      function TagAvailable: Boolean;
      property ErrorCode          : vtAVIErrorCode read FErrorCode;
      property Title              : String          read INAM_Title              write INAM_Title;
      property Director           : String          read IART_Director           write IART_Director;
      property Copyright          : String          read ICOP_Copyright          write ICOP_Copyright;
      property Product            : String          read IPRD_Product            write IPRD_Product;
      property CreationDate       : String          read ICRD_CreationDate       write ICRD_CreationDate;
      property Genre              : String          read IGNR_Genre              write IGNR_Genre;
      property SecondGenre        : String          read ISGN_SecondGenre        write ISGN_SecondGenre;
      property Subject            : String          read ISBJ_Subject            write ISBJ_Subject;
      property Keywords           : String          read IKEY_Keywords           write IKEY_Keywords;
      property Comment            : String          read ICMT_Comment            write ICMT_Comment;
      property Writer             : String          read IWRI_Writer             write IWRI_Writer;
      property Producer           : String          read IPRO_Producer           write IPRO_Producer;
      property ProductionDesigner : String          read IPDS_ProductionDesigner write IPDS_ProductionDesigner;
      property Editor             : String          read IEDT_Editor             write IEDT_Editor;
      property CostumeDesigner    : String          read ICDS_CostumeDesigner    write ICDS_CostumeDesigner;
      property Composer           : String          read IMUS_Composer           write IMUS_Composer;
      property ProductionStudio   : String          read ISTD_ProductionStudio   write ISTD_ProductionStudio;
      property Distributor        : String          read IDST_Distributor        write IDST_Distributor;
      property Country            : String          read ICNT_Country            write ICNT_Country;
      property Language           : String          read ILNG_Language           write ILNG_Language;
      property Rating             : String          read IRTD_Rating             write IRTD_Rating;
      property Part               : String          read IPRT_Part               write IPRT_Part;
      property PartFrom           : String          read IFRM_PartFrom           write IFRM_PartFrom;
      property Starring           : String          read ISTR_Starring           write ISTR_Starring;
      property Software           : String          read ISFT_Software           write ISFT_Software;
      property Encoder            : String          read ITCH_Encoder            write ITCH_Encoder;
      property DigitationDate     : String          read IDIT_DigitationDate     write IDIT_DigitationDate;
      property InternetAddress    : String          read IWEB_InternetAddress    write IWEB_InternetAddress;
      property SourceForm         : String          read ISRF_SourceForm         write ISRF_SourceForm;
      property Medium             : String          read IMED_Medium             write IMED_Medium;
      property Source             : String          read ISRC_Source             write ISRC_Source;
      property ArchivalLocation   : String          read IARL_ArchivalLocation   write IARL_ArchivalLocation;
      property ComissionedBy      : String          read ICMS_ComissionedBy      write ICMS_ComissionedBy;
      property Enginer            : String          read IENG_Enginer            write IENG_Enginer;
      property Croped             : String          read ICRP_Croped             write ICRP_Croped;
      property Sharpness          : String          read ISHP_Sharpness          write ISHP_Sharpness;
      property Dimensions         : String          read IDIM_Dimensions         write IDIM_Dimensions;
      property Lightness          : String          read ILGT_Lightness          write ILGT_Lightness;
      property Resolution         : String          read IDPI_Resolution         write IDPI_Resolution;
      property Palette            : String          read IPLT_Palette            write IPLT_Palette;
  end;

// -----------------------------------------------------------------------------

implementation

// -----------------------------------------------------------------------------

{ vtAVITag }

// -----------------------------------------------------------------------------

constructor vtAVITag.Create(const FileName: WideString);
begin
  FFileName := FileName;
  ClearTag;
  ReadTag;
end;

// -----------------------------------------------------------------------------

function vtAVITag.ReadTag: Boolean;
type
  TList_Info = record  // structure for remember enclosed RIFF lists
    Value   : LongInt; // old value (needed for reading info)
    Counter : LongInt; // counter of bytes read
  end;

  TFCCCode = array[1..4] of Char;

  TRiff_Info = record
    Name   : TFCCCode;
    Length : LongInt;
  end;

const
  TAG_Size = 131072;

var
  USFile      : vtFile;  // source tag file
  List_Name   : TFCCCode; // name of current list
  Buffer      : array[0..TAG_Size] of Char; // read buffer
  Riff_Info   : TRiff_Info; // variable for reading RIFF elements
  Riff_Length : LongInt; // length of AVI file from RIFF header
  Zero, x     : LongInt;
  List_Deep   : LongInt;
  Lists       : array[1..10] of TList_Info; // information about enclosed RIFF lists
  ErrorFound  : Boolean;

  procedure Recognize_TAG; // routine for recognizing tags
  var
    x    : LongInt;
    Temp : String; // buffer for tag content
  begin
    if Riff_Info.Length > TAG_Size then Exit; // skip big tags
    Temp := '';
    for x := 0 to Riff_Info.Length-1 do 
      Temp := Temp + Buffer[x]; // get tag content

    Temp := Trim(Temp);

    with Riff_Info do
      if Name = 'INAM' then INAM_Title              := Temp else
      if Name = 'IWRI' then IWRI_Writer             := Temp else
      if Name = 'IART' then IART_Director           := Temp else
      if Name = 'IPRD' then IPRD_Product            := Temp else
      if Name = 'ICRD' then ICRD_CreationDate       := Temp else
      if Name = 'ISTD' then ISTD_ProductionStudio   := Temp else
      if Name = 'ISTR' then ISTR_Starring           := Temp else
      if Name = 'IGNR' then IGNR_Genre              := Temp else
      if Name = 'ISBJ' then ISBJ_Subject            := Temp else
      if Name = 'IRTD' then IRTD_Rating             := Temp else
      if Name = 'ICOP' then ICOP_Copyright          := Temp else
      if Name = 'ILNG' then ILNG_Language           := Temp else
      if Name = 'IKEY' then IKEY_Keywords           := Temp else
      if Name = 'IPRT' then IPRT_Part               := Temp else
      if Name = 'IFRM' then IFRM_PartFrom           := Temp else
      if Name = 'ICMT' then ICMT_Comment            := Temp else
      if Name = 'ISFT' then ISFT_Software           := Temp else
      if Name = 'IDIT' then IDIT_DigitationDate     := Temp else
      if Name = 'IWEB' then IWEB_InternetAddress    := Temp else
      if Name = 'ICMS' then ICMS_ComissionedBy      := Temp else
      if Name = 'IENG' then IENG_Enginer            := Temp else
      if Name = 'ITCH' then ITCH_Encoder            := Temp else
      if Name = 'ISRF' then ISRF_SourceForm         := Temp else
      if Name = 'IMED' then IMED_Medium             := Temp else
      if Name = 'ISRC' then ISRC_Source             := Temp else
      if Name = 'IARL' then IARL_ArchivalLocation   := Temp else
      if Name = 'ICRP' then ICRP_Croped             := Temp else
      if Name = 'ISHP' then ISHP_Sharpness          := Temp else
      if Name = 'IDIM' then IDIM_Dimensions         := Temp else
      if Name = 'ILGT' then ILGT_Lightness          := Temp else
      if Name = 'IDPI' then IDPI_Resolution         := Temp else
      if Name = 'IPLT' then IPLT_Palette            := Temp else
      if Name = 'IMUS' then IMUS_Composer           := Temp else
      if Name = 'ICDS' then ICDS_CostumeDesigner    := Temp else
      if Name = 'ICNT' then ICNT_Country            := Temp else
      if Name = 'IDST' then IDST_Distributor        := Temp else
      if Name = 'IEDT' then IEDT_Editor             := Temp else
      if Name = 'ISGN' then ISGN_SecondGenre        := Temp else
      if Name = 'IPRO' then IPRO_Producer           := Temp else
      if Name = 'IPDS' then IPDS_ProductionDesigner := Temp;
  end;

begin
  Result := False;
  ClearTag;

  // try to assign/open file
  USFile := vtFile.Create(FFileName, fmOpenRead or fmShareDenyWrite);
  try
    if not USFile.Ready then // assigned/opened?
    begin
      FErrorCode := ecOpenError; // if failed - set error code and go out
      Exit;
    end;

    // read RIFF header
    if not USFile.Read(Riff_Info, 8) then
    begin
      FErrorCode := ecReadError; // if failed - set error code and go out
      Exit;
    end;

    // the name should be 'RIFF'
    if Riff_Info.Name <> 'RIFF' then
    begin
      FErrorCode := ecRIFFError; // if failed - set error code and go out
      Exit;
    end;

    // compute correct RIFF length
    Riff_Length := Riff_Info.Length + 8;
    if Riff_Length > USFile.Size then
    begin // the length of file should be not shorter then RIFF length
      FErrorCode := ecSizeError; // if failed - set error code and go out
      Exit;
    end;

    // read riffinfo
    if not USFile.Read(Riff_Info, 4) then
    begin
      FErrorCode := ecReadError; // if failed - set error code and go out
      Exit;
    end;

    // AVI file should have the corresponding mark
    if Riff_Info.Name <> 'AVI ' then
    begin
      FErrorCode := ecAVIError; // if failed - set error code and go out
      Exit;
    end;

    // Now we have normal AVI
    ErrorFound := False;
    List_Deep  := 1; // zero level of enclosed lists
    with Lists[List_Deep] do // make new counter
    begin
      Value   := Riff_Info.Length; // remember list length
      Counter := 4;                // initialize counter. Why "4" not "0"? We read 'AVI ', but list starts before this name.
    end;

    while not (USFile.EOF or (USFile.Position >= Riff_Length)) do // end analyze structure on file end
    begin
      if not USFile.Read(Riff_Info, 8) then // read RIFF info
        ErrorFound := True;

      for x := 1 to List_Deep do
        Inc(Lists[x].Counter, 8); // increase all the read counters

      if (Riff_Info.Length mod 2 = 1) then
        Inc(Riff_Info.Length); // align length to 2

      if Riff_Info.Name = 'LIST' then
      begin // new LIST found
        if not USFile.Read(List_Name, 4) then // read list name
          ErrorFound := True;

        for x := 1 to List_Deep do
          Inc(Lists[x].Counter, 4); // increase all the read counters

        Inc(List_Deep); // increase list deep
        with Lists[List_Deep] do
        begin // make new counter
          Value   := Riff_Info.Length; // remember list length
          Counter := 4;                // initialize counter of bytes read
        end;

        if (List_Name = 'movi') then
        begin // skip LIST movi - usual the biggest list in AVI file (video/audio data)
          if not USFile.Seek(USFile.Position + Riff_Info.Length - 4) then // skip list
            ErrorFound := True;

          for x := 1 to List_Deep do
            Inc(Lists[x].Counter, Riff_Info.Length - 4); // increase all the read counters
        end;
      end; // end of work with new LIST

      if Riff_Info.Name = 'JUNK' then
      begin // just for space section
        if not USFile.Seek(USFile.Position + Riff_Info.Length) then // skip section
          ErrorFound := True;

        for x := 1 to List_Deep do
          Inc(Lists[x].Counter, Riff_Info.Length); // increase all the read counters
      end;

      if (Riff_Info.Name <> 'JUNK') and (Riff_Info.Name <> 'LIST') then
      begin
        if (Riff_Info.Length <= USFile.Size-USFile.Position+1) and (Riff_Info.Length > 0) then
        begin // normal tag
          if (Riff_Info.Length > TAG_Size) then
            USFile.Seek(USFile.Position + Riff_Info.Length) // skip section
          else
            USFile.Read(Buffer, Riff_Info.Length); // read tag content

          for x := 1 to List_Deep do
            Inc(Lists[x].Counter, Riff_Info.Length); // increase all the read counters

          if USFile.ErrorCode <> 0 then
            ErrorFound := True
          else
            Recognize_TAG;
        end
        else
          ErrorFound := True; // if incorrect tag - structure error
      end;

      Zero := List_Deep;
      for x := 1 to Zero do // check the counters
        if Lists[x].Counter = Lists[x].Value then
          Dec(List_Deep); // decrease list deep
    end;

    if ErrorFound then
    begin
      FErrorCode := ecStructureError;
      Exit;
    end;

    FErrorCode := ecNone; // if we are here - no errors occure
    Result     := True;
  finally
    USFile.Free;
  end;
end;

// -----------------------------------------------------------------------------

procedure vtAVITag.ClearTag;
begin
  INAM_Title              := '';
  IART_Director           := '';
  ICOP_Copyright          := '';
  IPRD_Product            := '';
  ICRD_CreationDate       := '';
  IGNR_Genre              := '';
  ISGN_SecondGenre        := '';
  ISBJ_Subject            := '';
  IKEY_Keywords           := '';
  ICMT_Comment            := '';
  IWRI_Writer             := '';
  IPRO_Producer           := '';
  IPDS_ProductionDesigner := '';
  IEDT_Editor             := '';
  ICDS_CostumeDesigner    := '';
  IMUS_Composer           := '';
  ISTD_ProductionStudio   := '';
  IDST_Distributor        := '';
  ICNT_Country            := '';
  ILNG_Language           := '';
  IRTD_Rating             := '';
  IPRT_Part               := '';
  IFRM_PartFrom           := '';
  ISTR_Starring           := '';
  ISFT_Software           := '';
  ITCH_Encoder            := '';
  IDIT_DigitationDate     := '';
  IWEB_InternetAddress    := '';
  ISRF_SourceForm         := '';
  IMED_Medium             := '';
  ISRC_Source             := '';
  IARL_ArchivalLocation   := '';
  ICMS_ComissionedBy      := '';
  IENG_Enginer            := '';
  ICRP_Croped             := '';
  ISHP_Sharpness          := '';
  IDIM_Dimensions         := '';
  ILGT_Lightness          := '';
  IDPI_Resolution         := '';
  IPLT_Palette            := '';
end;

// -----------------------------------------------------------------------------

function vtAVITag.TagAvailable: Boolean;
begin
  if (INAM_Title <> '') or (IART_Director <> '') or (ICOP_Copyright <> '') or
     (IPRD_Product <> '') or (ICRD_CreationDate <> '') or (IGNR_Genre <> '') or
     (ISGN_SecondGenre <> '') or (ISBJ_Subject <> '') or (IKEY_Keywords <> '') or
     (ICMT_Comment <> '') or (IWRI_Writer <> '') or (IPRO_Producer <> '') or
     (IPDS_ProductionDesigner <> '') or (IEDT_Editor <> '') or
     (ICDS_CostumeDesigner <> '') or (IMUS_Composer <> '') or
     (ISTD_ProductionStudio <> '') or (IDST_Distributor <> '') or
     (ICNT_Country <> '') or (ILNG_Language <> '') or (IRTD_Rating <> '') or
     (IPRT_Part <> '') or (IFRM_PartFrom <> '') or (ISTR_Starring <> '') or
     (ISFT_Software <> '') or (ITCH_Encoder <> '') or (IDIT_DigitationDate <> '') or
     (IWEB_InternetAddress <> '') or (ISRF_SourceForm <> '') or (IMED_Medium <> '') or
     (ISRC_Source <> '') or (IARL_ArchivalLocation <> '') or (ICMS_ComissionedBy <> '') or
     (IENG_Enginer <> '') or (ICRP_Croped <> '') or (ISHP_Sharpness <> '') or
     (IDIM_Dimensions <> '') or (ILGT_Lightness <> '') or (IDPI_Resolution <> '') or
     (IPLT_Palette <> '') then
    Result := True
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

end.


Он получается информацию о avi-тэгах в видео файле, проблема в том, что если в пути(C:\mypath\моймувик\movie.avi) содержатся, я так понимаю, символы кирилицы, то модуль ничего не возвращает.

Немогу понять в чем проблема...

P.S. Можно ли с помощью TNT Unicode Control решить проблему?

Это сообщение отредактировал(а) Girder - 1.1.2007, 12:37
PM MAIL   Вверх
bems
Дата 31.12.2006, 05:35 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Комодератор
Сообщений: 3400
Регистрация: 5.1.2006

Репутация: 31
Всего: 88



а класс vtFile? может трабла там...


--------------------
Обижено школьников: 8
PM MAIL   Вверх
IDontBelieveInSilence
Дата 31.12.2006, 12:17 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 50
Регистрация: 3.11.2006

Репутация: нет
Всего: нет



Врятли... в любом случае, вот vtFile:

Код

unit vtFile;
// -----------------------------------------------------------------------------

// ------
interface
// ------

// 'Uses' section.
uses
   SysUtils;

// 'Type' section.
type
   { vtCustomFile }
   vtCustomFile = class
     private
         { Private declarations }
         FFileName  : String;
         FFileMode  : Byte;
         FReady     : Boolean;
         FOverwrite : Boolean;
         FErrorCode : Integer;
         procedure GetErrorCode;
         procedure Open; virtual; abstract;
         procedure Close; virtual; abstract;
     public
         { Public declarations }
         constructor Create(const FileName: String; const Mode: Byte = fmOpenRead; const Overwrite: Boolean = False);
         destructor Destroy; override;
         function EOF: Boolean; virtual; abstract;
         property Ready     : Boolean read FReady;
         property ErrorCode : Integer read FErrorCode;
   end;

   { vtFile }
   vtFile = class(vtCustomFile)
     private
         { Private declarations }
         FFile        : File;
         FTransferred : Integer;
         procedure Open; override;
         procedure Close; override;
     public
         { Public declarations }
         function Read(var Buf; Count: Integer): Boolean;
         function Write(const Buf; Count: Integer): Boolean;
         function Seek(N: LongInt): Boolean;
         function Position: LongInt;
         function Truncate: Boolean;
         function Size: Integer;
         function EOF: Boolean; override;
         property Transferred: Integer read FTransferred;
   end;

implementation
{ vtCustomFile }

constructor vtCustomFile.Create(const FileName: String; const Mode: Byte = fmOpenRead; const Overwrite: Boolean = False);
begin
  FFileName  := FileName;
  FFileMode  := FileMode;
  FReady     := False;
  FOverwrite := Overwrite;
  FErrorCode := 0;
  FileMode   := Mode;
  Open;
end;

// -----------------------------------------------------------------------------

destructor vtCustomFile.Destroy;
begin
  Close;
  FileMode := FFileMode;
  inherited Destroy;
end;

// -----------------------------------------------------------------------------

procedure vtCustomFile.GetErrorCode;
begin
  FErrorCode := IOResult;
end;

// -----------------------------------------------------------------------------

{ vtFile }

procedure vtFile.Open;
begin
  if (FFileName <> '') and FileExists(FFileName) then
  begin
    AssignFile(FFile, FFileName);
    {$I-}Reset(FFile, 1);{$I+}
    GetErrorCode;
    if FErrorCode = 0 then FReady := True;
  end;
end;

// -----------------------------------------------------------------------------

procedure vtFile.Close;
begin
  if FReady then {$I-}CloseFile(FFile);{$I+}
end;

// -----------------------------------------------------------------------------

function vtFile.Read(var Buf; Count: Integer): Boolean;
begin
  if FReady then
  begin
    {$I-}BlockRead(FFile, Buf, Count, FTransferred);{$I+}
    GetErrorCode;
    Result := (FErrorCode = 0);
  end
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

function vtFile.Write(const Buf; Count: Integer): Boolean;
begin
  if FReady then
  begin
    {$I-}BlockWrite(FFile, Buf, Count, FTransferred);{$I+}
    GetErrorCode;
    Result := (FErrorCode = 0);
  end
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

function vtFile.Seek(N: LongInt): Boolean;
begin
  if FReady then
  begin
    {$I-}System.Seek(FFile, N);{$I+}
    GetErrorCode;
    Result := (FErrorCode = 0);
  end
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

function vtFile.Position: LongInt;
begin
  if FReady then
  begin
    {$I-}Result := FilePos(FFile);{$I+}
    GetErrorCode;
  end
  else
    Result := 0;
end;

// -----------------------------------------------------------------------------

function vtFile.Truncate: Boolean;
begin
  if FReady then
  begin
    {$I-}System.Truncate(FFile);{$I+}
    GetErrorCode;
    Result := (FErrorCode = 0);
  end
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

function vtFile.Size: Integer;
begin
  if FReady then
  begin
    {$I-}Result := FileSize(FFile);{$I+}
    GetErrorCode;
  end
  else
    Result := 0;
end;

// -----------------------------------------------------------------------------

function vtFile.EOF: Boolean;
begin
  if FReady then
  begin
    {$I-}Result := System.EOF(FFile);{$I+}
    GetErrorCode;
  end
  else
    Result := False;
end;

// -----------------------------------------------------------------------------

end.


Это сообщение отредактировал(а) Girder - 1.1.2007, 12:38
PM MAIL   Вверх
Romikgy
Дата 31.12.2006, 14:25 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Любитель-программер
****


Профиль
Группа: Участник Клуба
Сообщений: 7326
Регистрация: 11.5.2005
Где: Porto Franco Odes sa

Репутация: 26
Всего: 146



А разве преобразовывать не надо ?
ведь
Цитата(IDontBelieveInSilence @  30.12.2006,  23:02 Найти цитируемый пост)
constructor vtAVITag.Create(const FileName: WideString);


Цитата(IDontBelieveInSilence @  30.12.2006,  23:02 Найти цитируемый пост)
USFile := vtFile.Create(FFileName, fmOpenRead or fmShareDenyWrite);

везде используется широкая строка
Цитата(IDontBelieveInSilence @  31.12.2006,  11:17 Найти цитируемый пост)

constructor vtCustomFile.Create(const FileName: String; const Mode: Byte = fmOpenRead; const Overwrite: Boolean = False);

а здесь уже обычная,
посмотри дебагером , как происходит преобразование, правильно или нет?


--------------------
Владение русской орфографией это как владение кунг-фу — истинные мастера не применяют его без надобности. 
smile

PM   Вверх
Bose
Дата 2.1.2007, 16:33 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
***


Профиль
Группа: Участник Клуба
Сообщений: 1458
Регистрация: 5.3.2005
Где: Riga, Latvia

Репутация: 23
Всего: 51



IDontBelieveInSilence, 
vtCustomFile и vtFile должны поддерживать работу с именем файла как с Widestring. 
AssignFile который используется у тебя работает с string. Для начала попробуй поставить TntUnicodeControls и поискать там замену для AssignFile. Что-то типа WideAssignFile. Если нет, то попробуй перевести на TtntFileStream.

PM MAIL WWW Skype   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "Delphi: Общие вопросы"
SnowyMetalFan
bemsPoseidon
Rrader

Запрещается!

1. Публиковать ссылки на вскрытые компоненты

2. Обсуждать взлом компонентов и делиться вскрытыми компонентами

  • Литературу по Дельфи обсуждаем здесь
  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда
  • Вопросы по реализации алгоритмов рассматриваются здесь
  • 90% ответов на свои вопросы можно найти в DRKB (Delphi Russian Knowledge Base) - крупнейшем в рунете сборнике материалов по Дельфи


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Snowy, MetalFan, bems, Poseidon, Rrader.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Delphi: Общие вопросы | Следующая тема »


 




[ Время генерации скрипта: 0.0574 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.