-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
BOM is included in the compiled source. #661
Comments
I'm not sure whose responsibility this is. The Svelte compiler itself is passed a string, not bytes, and I think it should be able to expect the string to contain just the actual document. What are you using to actual run Svelte? (Which build tool?) My understanding of how this stuff works is that whichever code is responsible for decoding bytes into strings isn't doing its job correctly. |
I am using the cli from PowerShell in Windows |
Looks like the CLI is always trying to interpret the input as UTF-8. (Aside - I think |
I have actually had the same 'issue' with json files, and "node contex" not able to handle them due to the BOM. Ended up with recoding the files, without BOM. |
IMO, it's a bug with https://github.com/sveltejs/svelte-cli. Even if it assumes utf8 encoding, it should strip the BOM and maybe add it to the generated components. See nodejs/node#3040 |
Can you try svelte-cli@1.3.7 and see if it fixes this please? |
Seems to fix the issue |
Great work |
When using Visual Studio it saves the HTML with BOM as default, this add's the following first line in the
The BOM should be ignored
The text was updated successfully, but these errors were encountered: