Recent

Author Topic: Assign File  (Read 17706 times)

DENAT

  • Newbie
  • Posts: 2
Assign File
« on: July 02, 2009, 02:42:27 pm »
Hello.
I have some problems with Assigfile using.

var
  plik : system.text;
  s: string;
begin
    AssignFile(plik,Form1.OpenDialog1.FileName);
    reset(plik);
    readln(plik,s);
    Shomessage(s);
    CloseFile(plik);     
end;

When line in textfile has polish signs ShowMessage shows empty text. 

Can you help me with this?       

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: Assign File
« Reply #1 on: July 02, 2009, 02:47:30 pm »
Try:
Shomessage(SysToUTF8(s));

DENAT

  • Newbie
  • Posts: 2
Re: Assign File
« Reply #2 on: July 02, 2009, 03:39:04 pm »
Thank You. It works.




theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: Assign File
« Reply #3 on: July 02, 2009, 05:30:45 pm »

 

TinyPortal © 2005-2018