<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 01.01.2020 13:00, Bart via fpc-devel
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMye31xoiXi4nJV4Vr=p0+c7v1g2htjtu3PHWU9UsYzv-FOFVQ@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">On Wed, Jan 1, 2020 at 12:25 PM Bart <a class="moz-txt-link-rfc2396E" href="mailto:bartjunk64@gmail.com"><bartjunk64@gmail.com></a> wrote:

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">By all means, patches welcome.
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
Patch attached.
For completeness I could implement also SaveToStream(AStream,
AWriteBom) and SaveToFile(FileName, AWriteBom).</pre>
    </blockquote>
    <br>
    <p><i>/ code begin /</i><br>
      -Procedure TStrings.SaveToStream(Stream: TStream; AEncoding:
      TEncoding);<br>
      -<br>
       Var B : TBytes;<br>
       <br>
       begin<br>
         if AEncoding=nil then<br>
           AEncoding:=FDefaultEncoding;<br>
      <b>-  if FWriteBOM then</b><b><br>
      </b><b>+  if AWriteBOM then</b><b><br>
      </b>     begin<br>
             B:=AEncoding.GetPreamble;<br>
             if Length(B)>0 then<br>
      <i>/ code end /</i></p>
    <p><br>
    </p>
    <p>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?<br>
    </p>
    <p>Ondrej<br>
    </p>
  </body>
</html>