Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#5

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

  Alt 24. Aug 2014, 14:34
Which first $0 are you talking about?
I'm talking about stream content (bytes). First 2 bytes are $64 (100d = Ascii(D)Ascii(d)) and $00. I'm trying load this stream as text (above code), in sample stream, after load to TStrings I have 'D''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''d')

Geändert von WojTec (24. Aug 2014 um 15:00 Uhr) Grund: Mistake
  Mit Zitat antworten Zitat