Jump to content
Press_ALT_F4

How can i handle spezialchars

Recommended Posts

Hallo,

 

sorry for my english :)

 

i want save/read strings like this: вℓα¢к∂єαтн™

in a txt-file or in a sqlite-db.

 

when i save the txt-file as unicode or UTF and i read it, returns it like this: вℓα¢к∂єαтн™-

 

(win xp)

 

how can i reach that i can save and read the special character correctly?

 

thx for help.

 

good bye :)

 

samplecode:

program New;

var datei: Integer;
var s: string;
var a: TStrArray;

begin

 datei := OpenFile('E:\Datenbanken\rotliste3.txt', False);
 ReadFileString(datei, s, FileSize(datei));
 WriteLn(s);
 CloseFile(datei);
 a:=explode(';',s);
 writeln(a[5] + ' --- ' + IntToStr(High(a)));

end.

Link to comment
Share on other sites

thx for answer :)

 

but i need die strings not in the current script.

the script should write in a kind of database.

a other script on other client in network need the data.

 

any idea?

 

bye :)

 

other question: how can i send a enter in a txt-file with appendfile?

 

i try this but dont work:

 

f := Appendfile(LogsPath + 'Test.txt', False);
WriteFileString(f, 'Hello Mars?' + #13);

 

or this

 

f := Appendfile(LogsPath + 'Test.txt', False);
WriteFileString(f, 'Hello Mars?' + chr(13));

 

both dont work :(

 

any idea whats wrong?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...