Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read file with international text(unicode) format

Status
Not open for further replies.

PlutoDev

Programmer
Sep 21, 2002
25
ID

I tried with bellow source, but failed....

procedure TForm1.Button1Click(Sender: TObject);
var
F : TextFile;
ch : char;
str : string;
begin
AssignFile(F, 'test.sql'); //file generate from (enteprice manager sql -> generate script)
reset(F); //Open F

while not EOF(F) do //Keeps reading each character until EOF (End Of File)
begin
read(F, ch);
str := str + ch;
end;

CloseFile(F); //Closes F
memo1.Text := (str); //Places the read text in variable str in memo2
end;

so, how to read the file with international text(unicode) format.

thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top