PDA

View Full Version : thinAir placing characters at beginning of file



scottdiver
10-04-2023, 16:02
When a file is saved, the editor is placing unseen characters when displayed in the editor, but they are in the file physically. The characters are:



I'm wondering if this is intentional. I removed the characters using another editor; however, when thinAir saved the file the next time, it put the characters back in. If it's intentional, why? And, if not, can we get it fixed?

The characters in Hex are : EF BB BF

ErosOlmi
11-04-2023, 09:43
Hi Scott,

those 3 bytes are called BOM: Byte Order Mask
Its presence indicates that the file has been encoded in UTF-8.

https://en.wikipedia.org/wiki/Byte_order_mark
https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-with-bom

Ciao
Eros

scottdiver
12-04-2023, 16:21
Hi Scott,

those 3 bytes are called BOM: Byte Order Mask
Its presence indicates that the file has been encoded in UTF-8.

https://en.wikipedia.org/wiki/Byte_order_mark
https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-with-bom

Ciao
Eros

Wow, that was a quick response. Thank you. I feel like I should have known that.

ErosOlmi
12-04-2023, 17:54
Well ... recently I was not very present in forum due to heavy work load.
But from time to time I'm here with others.

Needs at work have let us develop new thinBasic features and very soon we will release a new thinBasic version.

scottdiver
12-04-2023, 20:45
Well ... recently I was not very present in forum due to heavy work load.
But from time to time I'm here with others.

Needs at work have let us develop new thinBasic features and very soon we will release a new thinBasic version.

That is awesome.