Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Unicode BOM in source file causes compilation error #210

Open
ncote opened this issue Oct 29, 2016 · 1 comment
Open

Unicode BOM in source file causes compilation error #210

ncote opened this issue Oct 29, 2016 · 1 comment

Comments

@ncote
Copy link

ncote commented Oct 29, 2016

Files with UTF-8 encoding with the Unicode BOM (byte order mark) at the start don't compile, and the error is particularly cryptic in elm-reactor, since the error pointer points to a line that looks valid, since the BOM is not visible. On the command line (elm-make) with a non unicode terminal, 3 garbage characters appear, which might make this a bit more obvious.

Elm Platform 0.17.0 on Windows 7.

Here's an example from elm-reactor:

Detected errors in 1 module.

-- SYNTAX PROBLEM ---------------------------------------------------- Hello.elm

I ran into something unexpected when parsing your code!

1| import Html exposing (div, button, text)
   ^

And on my badly-configured terminal:

-- SYNTAX PROBLEM ---------------------------------------------------- Hello.elm

I ran into something unexpected when parsing your code!

1| import Html exposing (div, button, text)
@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

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

No branches or pull requests

2 participants