File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 25
25
-export ([start /2 , stop /1 , config_change /3 ]).
26
26
27
27
start (_Type , _Args ) ->
28
- _ = parse_otp_release (),
28
+ OTP = parse_otp_release (),
29
29
preload_common_modules (),
30
- set_stdio_and_stderr_to_binary_and_maybe_utf8 (),
30
+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (OTP ),
31
31
check_file_encoding (file :native_name_encoding ()),
32
32
33
33
case application :get_env (elixir , check_endianness , true ) of
@@ -87,7 +87,10 @@ stop(Tab) ->
87
87
config_change (_Changed , _New , _Remove ) ->
88
88
ok .
89
89
90
- set_stdio_and_stderr_to_binary_and_maybe_utf8 () ->
90
+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (OTP ) when OTP >= 26 ->
91
+ ok = io :setopts (standard_io , [binary ]),
92
+ ok ;
93
+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (_OTP ) ->
91
94
% % In case there is a shell, we can't really change its
92
95
% % encoding, so we just set binary to true. Otherwise
93
96
% % we must set the encoding as the user with no shell
You can’t perform that action at this time.
0 commit comments