erlang/otp — pull request #276 by richcarl (2014-03-07 06:17:33+00:00)
Title: Add default_encoding option to epp and compiler, generalizing the epp API

Make it possible to pass arbitrary options to epp:open(), and to get extra
information in the result from opening a file. Use this to add the option
{default_encoding, latin1|utf8} and to get any found encoding annotation in
the result from open(). Adapt compiler to use this new API, avoiding the
extra call to epp:read_encoding(), and passing the default_encoding option
on to epp. This enables running "erlc +'{default_encoding,latin1}'" to
compile legacy code.