DelphiAST icon indicating copy to clipboard operation
DelphiAST copied to clipboard

Conversion from bytes to characters is erroneous for source files containing a byte-order mark (BOM)

Open Occams opened this issue 1 year ago • 0 comments

Image

  • An existing BOM must be skipped (offset): System.Length(Encoding.GetPreamble())
  • Actual count of bytes to read must be adjusted: Size - System.Length(Encoding.GetPreamble()

Occams avatar Sep 09 '25 12:09 Occams