[2.0.69] UTF-8 with BOM encoding causes blueprint import exception on Linux

Xeinaemm
Inserter
Inserter
Posts: 26
Joined: Mon Nov 04, 2024 8:53 pm
Contact:

[2.0.69] UTF-8 with BOM encoding causes blueprint import exception on Linux

Post by Xeinaemm »

If you save a blueprint on Windows with UTF-8 with BOM encoding, anyone who will use it on Linux won't be able to import it, causing Invalid version:'(' exception.

More info in this Github thread: https://github.com/Xeinaemm/Factorio-Ti ... /issues/20
Rseding91
Factorio Staff
Factorio Staff
Posts: 16282
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.69] UTF-8 with BOM encoding causes blueprint import exception on Linux

Post by Rseding91 »

Thanks for the report however I am unable to reproduce it working *at all* when with a BOM in the drag-and-drop scenario. I get the exact same error on my machine when I try to use any blueprint string file with a BOM - it's simply an invalid file format.

When I copy-paste the contents onto the clipboard and them attempt to paste them into the game - Windows has already stripped the BOM from the clipboard contents making it a valid string for the game to paste and import.

In both cases - the game only ever accepts a no-BOM string.

Is there something I missed in trying to reproduce it?
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16282
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.69] UTF-8 with BOM encoding causes blueprint import exception on Linux

Post by Rseding91 »

I've changed the drag-and-drop file logic for 2.1 so it will ignore the BOM. If there's another case, please let me know.
If you want to get ahold of me I'm almost always on Discord.
Xeinaemm
Inserter
Inserter
Posts: 26
Joined: Mon Nov 04, 2024 8:53 pm
Contact:

Re: [2.0.69] UTF-8 with BOM encoding causes blueprint import exception on Linux

Post by Xeinaemm »

I believe you handled it flawlessly. I'll redirect everyone to this thread if they find anything more.
Post Reply

Return to “Fixed for 2.1”