[fpc-devel] TStrings and BOM
    Ondrej Pokorny 
    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;
  begin
    if AEncoding=nil then
      AEncoding:=FDefaultEncoding;
*-  if FWriteBOM then**
**+  if AWriteBOM then**
*     begin
        B:=AEncoding.GetPreamble;
        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?
Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200101/f495b2b2/attachment.html>
    
    
More information about the fpc-devel
mailing list