[erlang-questions] [ANN] Erlang/OTP 17.0-rc2 has been released.
Richard Carlsson
carlsson.richard@REDACTED
Fri Feb 28 13:48:23 CET 2014
On 2014-02-27 16:33 , Kenneth Lundin wrote:
> OTP-11719 == erts ==
>
> *The default encoding of Erlang files has been changed from ISO-8859-1
> to UTF-8. The encoding of XML files has also been changed to UTF-8.*
>
> Please verify that your source code compiles with Erlang/OTP 17. If your
> (ISO-8559-1 / Latin-1 encoded) source code files contain characters that
> are outside of the bit 7-bit ASCII character set, you will receive a
> compiler error similar to the following:
>
> tst.erl:1: cannot parse file, giving up
> tst.erl:1: no module definition
> tst.erl:1: cannot translate from UTF-8
>
> In this case, you need to apply one of the following alternatives to
> each (impacted) file:
>
> Alternative 1: Encode the file in UTF-8 (instead of Latin-1). If the
> file is going to be compiled with both OTP 17 and previous versions,
> insert a comment stating the encoding at the beginning of the file:
>
> %% -*- coding: utf-8 -*-
>
> Alternative 2: Leave the file encoded as Latin-1 and insert a comment
> stating the encoding at the beginning of the file:
>
> %% -*- coding: latin-1 -*-
I expected to have an erlc flag that would tell epp which encoding to
default to in case there is no info in the files. Or did I miss it?
Having to edit hundreds of files owned by many different development
teams before I can get this through the compiler is a non-starter.
(It seems that adding more options to epp requires a new function. May I
suggest open/1 that takes a list [{file,...}, ...].)
/Richard
More information about the erlang-questions
mailing list