[fpc-devel] TStrings and BOM
lazarus at kluug.net
Wed Jan 1 21:56:42 CET 2020
On 01.01.2020 13:00, Bart via fpc-devel wrote:
> On Wed, Jan 1, 2020 at 12:25 PM Bart <bartjunk64 at gmail.com> wrote:
>>> By all means, patches welcome.
> Patch attached.
> For completeness I could implement also SaveToStream(AStream,
> AWriteBom) and SaveToFile(FileName, AWriteBom).
// code begin //
-Procedure TStrings.SaveToStream(Stream: TStream; AEncoding: TEncoding);
Var B : TBytes;
if AEncoding=nil then
*- if FWriteBOM then**
**+ if AWriteBOM then**
if Length(B)>0 then
// code end //
You replace the WriteBOM property with the AWriteBOM parameter. What's
the point of it? What do you plan to do with the WriteBOM property then?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel