[fpc-devel] TStrings and BOM
Dmitry Boyarintsev
skalogryz.lists at gmail.com
Thu Jan 2 01:12:02 CET 2020
On Wed, Jan 1, 2020 at 7:07 PM Ondrej Pokorny <lazarus at kluug.net> wrote:
> > The WriteBOM property has a valid purpose - it is set in LoadFrom*
> > according to the BOM presence in the loaded file. I.e. if you do:
> >
> > MyStrings.LoadFromFile('abc'); // WriteBOM and Encoding properties are
> > set here
> > MyStrings.SaveToFile('abc'); // they are used here to save the file as
> > it was loaded
>
Where is it coming from?
There's nothing about that in WriteBOM nor LoadFromFile
http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.WriteBOM
http://docwiki.embarcadero.com/Libraries/Rio/en/System.Classes.TStrings.LoadFromFile
>From Delphi 10.3
WriteBOM is set to true, by default.
LoadFromFile doesn't affect the value in any manner (no matter if BOM is
present in the file or not).
(looking at the delphi code, doesn't suggest that WriteBOM is being changed
in any manner either)
thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200101/14fe0ceb/attachment.html>
More information about the fpc-devel
mailing list