[fpc-devel] TStrings and BOM
bartjunk64 at gmail.com
Wed Jan 1 13:00:39 CET 2020
On Wed, Jan 1, 2020 at 12:25 PM Bart <bartjunk64 at gmail.com> wrote:
> > By all means, patches welcome.
For completeness I could implement also SaveToStream(AStream,
AWriteBom) and SaveToFile(FileName, AWriteBom).
B.t.w. Am I correct in understanding that when TStrinsg.SaveTo*()
without an encoding parameter (so, the 1 parameter version) will NOT
write the BOM if Encoding = nil, whereas the SaveTo* with Encoding
parameter will write the BOM if Encoding is nil?
(Assuming that WriteBom=True and DefaultEncoding.GetPreamble returns
something with Length > 0)
It feels a bit inconsistent to me.
I would have expected that SaveToStream(AStream) would simply call
It could of course be that Deplhi has implemented it that way (and we
must follow), but since my last Delphi version is D7, I cannot test
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2203 bytes
Desc: not available
More information about the fpc-devel