aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-06-16 11:54:41 +0200
committerSiri Hansen <[email protected]>2017-06-16 11:54:41 +0200
commitcdc5545536ddeedf9ae4db20464afa6565f4327d (patch)
tree85fac17bf876b0f26bbb0c123ba9ed9c7b788059 /lib/stdlib
parentd3a53ae2b2800b33f3b25b83ff2314e64153c2aa (diff)
parentaa4c93a7e04ce57584f7591b2b0cc62f4407ca00 (diff)
downloadotp-cdc5545536ddeedf9ae4db20464afa6565f4327d.tar.gz
otp-cdc5545536ddeedf9ae4db20464afa6565f4327d.tar.bz2
otp-cdc5545536ddeedf9ae4db20464afa6565f4327d.zip
Merge branch 'siri/unicode-atoms/OTP-14285'
* siri/unicode-atoms/OTP-14285: [sasl] Improve handling of unicode in rb [ttb] Handle unicode atoms in trace data and config files [dbg] Update default trace handler to print unicode atoms correctly [etop] Fix handling of unicode atoms [stdlib] Open sys debug logs as utf8 [stdlib] Open error log file as utf8 [sasl] Improve handling of unicode atoms [ct] Print unicode atoms and strings correctly in common_test logs
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/doc/src/sys.xml2
-rw-r--r--lib/stdlib/src/error_logger_file_h.erl2
-rw-r--r--lib/stdlib/src/sys.erl4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml
index f24e42bcee..64d8789016 100644
--- a/lib/stdlib/doc/src/sys.xml
+++ b/lib/stdlib/doc/src/sys.xml
@@ -308,7 +308,7 @@
format to the file. The events are formatted with a function that is
defined by the process that generated the event (with a call to
<seealso marker="#handle_debug/4"><c>handle_debug/4</c></seealso>).
- </p>
+ The file is opened with encoding UTF-8.</p>
</desc>
</func>
diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl
index 76f89841b9..b7c193f965 100644
--- a/lib/stdlib/src/error_logger_file_h.erl
+++ b/lib/stdlib/src/error_logger_file_h.erl
@@ -55,7 +55,7 @@ init(File) ->
init(File, PrevHandler) ->
process_flag(trap_exit, true),
- case file:open(File, [write]) of
+ case file:open(File, [write,{encoding,utf8}]) of
{ok,Fd} ->
Depth = error_logger:get_format_depth(),
State = #st{fd=Fd,filename=File,prev_handler=PrevHandler,
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 ->