aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ic/src
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2014-03-17 10:39:42 +0100
committerLars Thorsen <[email protected]>2014-03-28 10:21:06 +0100
commit6b1fb34e5d3dacf432fe6785c3455a363543574f (patch)
treec0cd231cb702583db32ad297d49ca72596fe6306 /lib/ic/src
parent7811310ee2c72173824007d3db73ae2b62a725d9 (diff)
downloadotp-6b1fb34e5d3dacf432fe6785c3455a363543574f.tar.gz
otp-6b1fb34e5d3dacf432fe6785c3455a363543574f.tar.bz2
otp-6b1fb34e5d3dacf432fe6785c3455a363543574f.zip
[ic] Fix latin-1 characters in generated erl file
Diffstat (limited to 'lib/ic/src')
-rw-r--r--lib/ic/src/ic.erl2
-rw-r--r--lib/ic/src/ic_codegen.erl3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/ic/src/ic.erl b/lib/ic/src/ic.erl
index c0742cf7bd..4f3e8d180c 100644
--- a/lib/ic/src/ic.erl
+++ b/lib/ic/src/ic.erl
@@ -250,7 +250,7 @@ make_erl_options(Opts) ->
Optimize = Opts#options.optimize,
PreProc =
lists:flatten(
- lists:map(fun(D) -> io_lib:format("-I\"~s\" ", [ic_util:to_list(D)]) end,
+ lists:map(fun(D) -> io_lib:format("-I\"~ts\" ", [ic_util:to_list(D)]) end,
Includes1)++
lists:map(
fun ({Name, Value}) ->
diff --git a/lib/ic/src/ic_codegen.erl b/lib/ic/src/ic_codegen.erl
index f611c69bea..82431b79a2 100644
--- a/lib/ic/src/ic_codegen.erl
+++ b/lib/ic/src/ic_codegen.erl
@@ -216,12 +216,14 @@ exp_to_string({F,N}) -> io_lib:format("~p/~p", [ic_util:to_atom(F), N]).
%%--------------------------------------------------------------------
emit_stub_head(_G, ignore, _Name, _) -> ignore;
emit_stub_head(G, F1, Name, erlang) ->
+ comment(F1, " coding: latin-1", []),
mcomment(F1, stub_header(G, Name)),
nl(F1),
emit(F1, "-module(~p).\n", [list_to_atom(Name)]),
emit(F1, "-ic_compiled(~p).\n", [compiler_vsn(?COMPILERVSN)]),
emit(F1, "\n\n"), F1;
emit_stub_head(G, F1, Name, erlang_template) ->
+ comment(F1, " coding: latin-1", []),
ic_erl_template:emit_header(G, F1, Name),
F1;
emit_stub_head(_G, F1, _Name, erlang_template_no_gen) ->
@@ -259,6 +261,7 @@ compiler_vsn(Vsn) ->
%% Name is Fully scoped (undescore) name of interface or module
emit_hrl_head(_G, ignore, _Name, _) -> ignore;
emit_hrl_head(G, Fd, Name, erlang) ->
+ comment(Fd, " coding: latin-1", []),
mcomment(Fd, ["Erlang header file" |
hrl_header(G, Name)]),
nl(Fd),