[erlang-questions] First Erlang experiences- not so good
Benjamin Johnston
johnston@REDACTED
Thu Sep 25 07:35:41 CEST 2008
>I've been going through this intro to Erlang
>
>http://www.onlamp.com/pub/a/onlamp/2007/09/13/introduction-to-erlang.html?page=last#thread
>
>For some reason, the example.erl file on the above site, will not compile.
>
>
Hi Tony,
Even though they look identical, the example.erl file on the above site,
and the file that you have attached are different. Try opening them up
in a hex editor/viewer and you will see the difference.
Your attachment is encoded in Unicode: the first two bytes of your file
are 0xFF, 0xFE, and every second byte of the file is a 0x00. The
example.erl on the above site is not in Unicode. The compiler apparently
does not like Unicode, so you'll need to configure your editor to save
in some other format.
You can get example.erl to compile by opening it up in notepad, and then
click "Save As". In the "Save As" dialog box, there is an option to
choose your encoding. If you select ANSI, the file will compile correctly.
I hope that helps,
-Ben
More information about the erlang-questions
mailing list