This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Description
If you try to run a UTF-8 with BOM encoded script like
#!/usr/bin/env node
console.log("UTF8!");
it fails with
./test.js: 1: #!/usr/bin/env: not found
./test.js: 3: Syntax error: word unexpected (expecting ")")
if run as executable script or
test.js:1
#!/usr/bin/env
^
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
SyntaxError: Unexpected token ILLEGAL
if given to node.
Scripts encoded in ANSI or UTF-8 without BOM work fine.