DelphiAST
DelphiAST copied to clipboard
Conversion from bytes to characters is erroneous for source files containing a byte-order mark (BOM)
- 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()