aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-04-11 15:22:23 +0200
committerBjörn Gustavsson <[email protected]>2014-04-11 15:27:15 +0200
commit338698874e1f57a38c469e6e5b876d12ee14a0fb (patch)
tree8196c44574c9a7201122d2f6c41117a5a0489e6c
parent07b8f441ca711f9812fad9e9115bab3c3aa92f79 (diff)
downloadotp-338698874e1f57a38c469e6e5b876d12ee14a0fb.tar.gz
otp-338698874e1f57a38c469e6e5b876d12ee14a0fb.tar.bz2
otp-338698874e1f57a38c469e6e5b876d12ee14a0fb.zip
The encoding for '-eval Program' should be UTF-8
If file:name_native_encoding() returns 'utf8', any arguments following the -run option are assumed to be encoded in UTF-8. -eval should treat is argument the same way.
-rw-r--r--erts/preloaded/ebin/init.beambin48796 -> 48780 bytes
-rw-r--r--erts/preloaded/src/init.erl2
2 files changed, 1 insertions, 1 deletions
diff --git a/erts/preloaded/ebin/init.beam b/erts/preloaded/ebin/init.beam
index 7f2d2740e1..26f779500c 100644
--- a/erts/preloaded/ebin/init.beam
+++ b/erts/preloaded/ebin/init.beam
Binary files differ
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl
index ab8464956c..e95e11b3e6 100644
--- a/erts/preloaded/src/init.erl
+++ b/erts/preloaded/src/init.erl
@@ -1041,7 +1041,7 @@ start_em([]) -> ok.
start_it([]) ->
ok;
start_it({eval,Bin}) ->
- Str = binary_to_list(Bin),
+ Str = b2s(Bin),
{ok,Ts,_} = erl_scan:string(Str),
Ts1 = case reverse(Ts) of
[{dot,_}|_] -> Ts;