<div dir="ltr"><div dir="ltr">On Wed, Jan 1, 2020 at 7:07 PM Ondrej Pokorny <<a href="mailto:lazarus@kluug.net">lazarus@kluug.net</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> The WriteBOM property has a valid purpose - it is set in LoadFrom* <br>
> according to the BOM presence in the loaded file. I.e. if you do:<br>
><br>
> MyStrings.LoadFromFile('abc'); // WriteBOM and Encoding properties are <br>
> set here<br>
> MyStrings.SaveToFile('abc'); // they are used here to save the file as <br>
> it was loaded<br></blockquote><div>Where is it coming from?</div><div>There's nothing about that in WriteBOM nor LoadFromFile</div><div><a href="http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.WriteBOM">http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.WriteBOM</a>  <br></div><div><a href="http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.LoadFromFile">http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.LoadFromFile</a>  <br></div><div><br></div><div>From Delphi 10.3</div><div>WriteBOM is set to true, by default.</div><div>LoadFromFile doesn't affect the value in any manner (no matter if BOM is present in the file or not).</div><div>(looking at the delphi code, doesn't suggest that WriteBOM is being changed in any manner either)</div><div><br></div><div>thanks,<br></div><div>Dmitry</div></div></div>