Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Byte order mark causes compilation error #36

Open
Nixinova opened this issue Apr 11, 2021 · 2 comments
Open

Byte order mark causes compilation error #36

Nixinova opened this issue Apr 11, 2021 · 2 comments

Comments

@Nixinova
Copy link

Any scripts that have a byte order mark accidentally added will not compile, with the following error message being produced:

 [Error] Can't handle character: "" (0:0) in file .//data/mb/scripts/map/countdown.mcscript

 .//data/mb/scripts/map/countdown.mcscript was not compiled!

BOM can be removed using something like the following:

.replace(/^\uFEFF|^\u00BB\u00BF/,"");

I can issue a PR doing so later.

@drhuffman12
Copy link

@Nixinova I like your idea of replacing the added BOM as per #39 as a 'work-around' to keep things running, so to speak. But I wonder what causes the Any scripts that have a byte order mark accidentally added part in the first place? Maybe someone should look into fixing whatever is the 'cause' that is adding it?

@Nixinova
Copy link
Author

whatever is the 'cause' that is adding it?

It's just a different file encoding type in my editor. Vscode has encoding types e.g. utf8, utf16, utf8+bom etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants