Page 1 of 1

I've got BOOM

Posted: Mon Jan 26, 2026 5:07 pm
by Sergey
Hi,
ReadFile
Syntax: Result = ReadFile(#File, Filename$ [, Flags])
Flags (optional) ... #PB_File_BOM : if the file contains a BOM, it will be handled automatically (no need to use ReadStringFormat()).
The detected format will be automatically used by the read and write string functions.

Ok, just test this flag
Create empty source file, write it near with program and name it "bom.pb"
Small code for reading file

Code: Select all

hFile = ReadFile(#PB_Any, "bom.pb", #PB_File_BOM)
Memory error in log :(
If we make zero as #file the program will execute without error

PB630 Win10x64 (Unicode)