#15 TlkJSONstreamed.SaveToStream does not work in unicode

v1.0 (example)
open
nobody
None
5
2013-11-22
2013-11-22
Yann Papouin
No

SizeOf(Char) must be added in the computation:
SizeOf(Char) = 1 byte in ascii
SizeOf(Char) = 1 word in unicode

class procedure TlkJSONstreamed.SaveToStream(obj: TlkJSONbase;
dst: TStream);
var
ws: string;
begin
if not assigned(obj) then exit;
if not assigned(dst) then exit;
ws := GenerateText(obj);
dst.Write(pchar(ws)^, length(ws)* SizeOf(Char));
end;

Discussion