diff options
author | Siri Hansen <[email protected]> | 2017-06-09 17:47:34 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-06-16 11:52:21 +0200 |
commit | 24b35460a12799f595da2430cc2904c88873c7a7 (patch) | |
tree | 483f1350d062a6af7c1d0cb3a6d4c00c8ebd0961 /lib/stdlib/src | |
parent | 98e0ccb4a56b3b2b6a552463f78e699ec7490669 (diff) | |
download | otp-24b35460a12799f595da2430cc2904c88873c7a7.tar.gz otp-24b35460a12799f595da2430cc2904c88873c7a7.tar.bz2 otp-24b35460a12799f595da2430cc2904c88873c7a7.zip |
[stdlib] Open sys debug logs as utf8
This allows the use of ~ts/~tp/~tw in the formatting fun to
sys:handle_debug/4.
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/sys.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl index a6ecf03716..1003c7c02b 100644 --- a/lib/stdlib/src/sys.erl +++ b/lib/stdlib/src/sys.erl @@ -525,7 +525,7 @@ debug_cmd({log_to_file, false}, Debug) -> {ok, NDebug}; debug_cmd({log_to_file, FileName}, Debug) -> NDebug = close_log_file(Debug), - case file:open(FileName, [write]) of + case file:open(FileName, [write,{encoding,utf8}]) of {ok, Fd} -> {ok, install_debug(log_to_file, Fd, NDebug)}; _Error -> @@ -648,7 +648,7 @@ debug_options([{log, N} | T], Debug) when is_integer(N), N > 0 -> debug_options([statistics | T], Debug) -> debug_options(T, install_debug(statistics, init_stat(), Debug)); debug_options([{log_to_file, FileName} | T], Debug) -> - case file:open(FileName, [write]) of + case file:open(FileName, [write,{encoding,utf8}]) of {ok, Fd} -> debug_options(T, install_debug(log_to_file, Fd, Debug)); _Error -> |