On 01.01.2020 13:00, Bart via fpc-devel wrote:
On Wed, Jan 1, 2020 at 12:25 PM Bart <bartjun...@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
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel