Recent

Author Topic: TStringList SaveToFile with TEncoding and BOM  (Read 1844 times)

M+AUDIO

  • New Member
  • *
  • Posts: 47
TStringList SaveToFile with TEncoding and BOM
« on: January 29, 2017, 05:21:38 pm »
Hello,

It is a rare situation I think. no search result found.

If the string which we are going to SaveToFile contains a BOM (any?) and we use TStringList.SaveToFile(const FileName: string; AEncoding: TEncoding) then the resulting file will have a doubled BOM or an unknown BOM "ff fe ef" (in case of pure FPC). Using a Hex editor to see of course.

Can you please check?
---
FPC Trunk  r35106
Lazarus Trunk r53927
Windows 7 x64
Linux Xubuntu 16.04