Windows executable error prompt "Invalid char 239 at position 0"

It compiles without an error but when I run my application I just get this:

Any ideas?

Finally worked out what was going wrong.
I was loading a JSON with Asset.getText, a spritesheet JSON created with Adobe Animate, but it started with a BOM so it wouldn’t parse.
I remember many years ago having encoding issues with JSONs generated by Flash. I don’t really understand why you need a BOM on a JSON, am I missing something or is this just incompetence on their part?

The byte-order-mark could help with endianness issues, but generally I find the BOM just causes more harm than good :slight_smile: