diff options
author | Siri Hansen <[email protected]> | 2017-08-22 16:41:25 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-05 11:29:26 +0200 |
commit | d4317108cb50081de28337685e77564854175704 (patch) | |
tree | 5f5016f1f731ec373680db55df1d3b70c0a32933 /lib/stdlib/test | |
parent | bb011e3dff9ec67561e6acafca803e079a3d4ecc (diff) | |
download | otp-d4317108cb50081de28337685e77564854175704.tar.gz otp-d4317108cb50081de28337685e77564854175704.tar.bz2 otp-d4317108cb50081de28337685e77564854175704.zip |
stdlib: add Unicode translation modifier in error_logger_tty_h
Check if standard_io can handle Unicode, and if so add the 't'
modifier to format strings.
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r-- | lib/stdlib/test/error_logger_h_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/stdlib/test/error_logger_h_SUITE.erl b/lib/stdlib/test/error_logger_h_SUITE.erl index 30f96e0522..1f2a9fda0b 100644 --- a/lib/stdlib/test/error_logger_h_SUITE.erl +++ b/lib/stdlib/test/error_logger_h_SUITE.erl @@ -162,7 +162,7 @@ tty_log_open(Log) -> {ok,D} -> D; _ -> unlimited end, - error_logger:add_report_handler(?MODULE, {Fd,Depth}), + error_logger:add_report_handler(?MODULE, {Fd,Depth,latin1}), Fd. tty_log_close() -> @@ -393,11 +393,11 @@ dl_format_1([], [], _, Facc, Aacc) -> %%% calling error_logger_tty_h:write_event/2. %%% -init({_,_}=St) -> +init({_,_,_}=St) -> {ok,St}. -handle_event(Event, {Fd,Depth}=St) -> - case error_logger_tty_h:write_event(tag_event(Event), io_lib, Depth) of +handle_event(Event, {Fd,Depth,Enc}=St) -> + case error_logger_tty_h:write_event(tag_event(Event), io_lib, {Depth,Enc}) of ok -> ok; Str when is_list(Str) -> @@ -405,7 +405,7 @@ handle_event(Event, {Fd,Depth}=St) -> end, {ok,St}. -terminate(_Reason, {Fd,_}) -> +terminate(_Reason, {Fd,_,_}) -> ok = file:close(Fd), []. |