diff options
author | Björn Gustavsson <[email protected]> | 2014-04-11 15:22:23 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-04-11 15:27:15 +0200 |
commit | 338698874e1f57a38c469e6e5b876d12ee14a0fb (patch) | |
tree | 8196c44574c9a7201122d2f6c41117a5a0489e6c /erts/preloaded/src | |
parent | 07b8f441ca711f9812fad9e9115bab3c3aa92f79 (diff) | |
download | otp-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.
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r-- | erts/preloaded/src/init.erl | 2 |
1 files changed, 1 insertions, 1 deletions
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; |