2009/10/23 Gerard N/A <gerardusmerca...@gmail.com>: > > Could it be that the length indicator bytes of the string are written > to the stream?
Ah, looking at the .WriteAnsiString() implementation, you seem to be 100% correct. Procedure TStream.WriteAnsiString (const S : String); Var L : Longint; begin L:=Length(S); WriteBuffer (L,SizeOf(L)); WriteBuffer (Pointer(S)^,L); end; That function is then very deceiving - by doing something extra to what the method name suggests. Why is the writing of the string length as a prefix needed? > Did you try writing with WriteBuffer(Atext[1], length(AText)? That works exactly like I intended. Thanks Gerard. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal