This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
UTF-8 with BOM encoded scripts fail #1440
Labels
Comments
bnoordhuis
added a commit
to bnoordhuis/node
that referenced
this issue
Aug 2, 2011
BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception. Fixes nodejs#1440.
@bnoordhuis The code LGTM, but I can't actually get the tests to fail without the code change. Is git "fixing" the BOM byte or something? |
The BOM is in the repo:
Do you have locale settings configured in your ~/.gitconfig or .git/config? |
In my environment, |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you try to run a UTF-8 with BOM encoded script like
it fails with
if run as executable script or
if given to node.
Scripts encoded in ANSI or UTF-8 without BOM work fine.
The text was updated successfully, but these errors were encountered: