Einzelnen Beitrag anzeigen

Benutzerbild von Sir Rufo
Sir Rufo

Registriert seit: 5. Jan 2005
Ort: Stadthagen
9.454 Beiträge
 
Delphi 10 Seattle Enterprise
 
#6

AW: Re: AW: $0 in stream and loading as text

  Alt 24. Aug 2014, 14:55
Which first $0 are you talking about?
I'm talking about stream content (bytes). First 2 bytes are $64 (100d = Ascii(D)) and $00. I'm trying load this stream as text (above code), in sample stream, after load to TStrings I have 'D', so looks they stop decoding text when see $0.

When I save data and load in notepad, I see characters separated with space. I want to decode whole stream as text, even if $0 bytes inside.

TStringStream.Create('', TEncoding.Unicode)
TStringStream.LoadFromStream(Source);
TStrings.LoadFromStream(TStringStream);
// result = samplestream('D')
Oh, you are in a bigger trouble than I thought. You should have seen d and not D.
So maybe yor compiler or compter is broken ... sorry to tell that
Kaum macht man's richtig - schon funktioniert's
Zertifikat: Sir Rufo (Fingerprint: ‎ea 0a 4c 14 0d b6 3a a4 c1 c5 b9 dc 90 9d f0 e9 de 13 da 60)
  Mit Zitat antworten Zitat