While taking a look to some saved sources with PB4 final i noticed something mysterious in the header of saved sourcecodes. the first 3 bytes of those pb source files are defined by follwing, $EF $BB $BF followed by the normal source :roll:
If you try to load the source into v4 IDE, the first 3 mysterious chars (bytes) are not visible (cutted off) ... if you try to load the source into IDE v3.x you will see "  "
someone an idea?
PB4 Win32 - bug or feature in saved v4 sources
PB4 Win32 - bug or feature in saved v4 sources
va!n aka Thorsten
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
This is the BOM-Header for UTF-8 Files. Is a feature, not a bug 
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

http://en.wikipedia.org/wiki/Byte_Order_Mark
ReadStringFormat() and WriteStringformat().
If using Readstringformat() as first on an opened text file and when the result is one of the PB UTF Codes the filepointer will be set behind the BOM marker, otherwise the filepointer wont be forwarded, means will be kept at the position before the Readstringformat() call. So using that command on an opened textfile is never bad
. This makes secure how to read properly the following character content by using the readstring commands with the needed flag
Its also supported by PB4s File commands as... as a marker to indicate that text is encoded in UTF-8, UTF-16 or UTF-32. ...
ReadStringFormat() and WriteStringformat().
If using Readstringformat() as first on an opened text file and when the result is one of the PB UTF Codes the filepointer will be set behind the BOM marker, otherwise the filepointer wont be forwarded, means will be kept at the position before the Readstringformat() call. So using that command on an opened textfile is never bad
Check out OOP support for PB here!


