Autor Beitrag
phoque
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Mi 09.11.05 09:53 
Ich versuche gerade Datensaetze Zeilenweise in eine Datei zu schreiben.

Etwa so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
var
  T: TFileStream;
  laenge: integer;
begin
  T := TFileStream.Create(ExtractFilePath(Application.ExeName) + 'conversion\zzzz.txt', fmCreate);
  while ... do
  begin
    Zeile := inttostr(regel_i) + ';' + inttostr(regel_j) + ';' + inttostr(x) + ';' + inttostr(y) + #13#10;
    laenge := length(Zeile);
    T.Write( Zeile ,laenge)
  end;
  T.Free;
end;


Da kommt dann immer so etwas in der art bei Raus:

ausblenden Quelltext
1:
,mœ ´�š øaÜ c   �   ?ƒPmœ ´�š p¨ß c   ‘   _‚´�š ,mœ °× d   �   Àz@mœ ,mœ p¨					


Was mache ich da Falsch?

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 09.11.05 10:23 
Hallo,

wie waere es mit
ausblenden Delphi-Quelltext
1:
2:
3:
T.Write( Zeile[1] ,laenge);
oder
T.Write( pchar(Zeile)^ ,laenge);


Gruss Horst