diff options
author | Hans Bolinder <[email protected]> | 2017-06-12 12:23:48 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-06-12 12:23:48 +0200 |
commit | dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2 (patch) | |
tree | 3a9e25f48a204a774a1933b3a995cdfcea4c8753 /lib/stdlib/src/proc_lib.erl | |
parent | 49e7329b04af4f4f93d0f5c3e6900e3473d765d2 (diff) | |
parent | 3ddf2b343c62d2dcd1678ded3f20639ae5c00812 (diff) | |
download | otp-dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2.tar.gz otp-dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2.tar.bz2 otp-dd9e39dc2b97e30c03b24a00eb757be7d2c2bdc2.zip |
Merge branch 'hasse/unicode_atoms/OTP-14285'
* hasse/unicode_atoms/OTP-14285:
compiler: Handle (bad) Unicode parse transform module names
kernel: Improve handling of Unicode filenames
stdlib: Handle Unicode atoms in ms_transform
stdlib: Improve Unicode handling of the Erlang parser
stdlib: Handle unknown compiler options with Unicode
stdlib: Handle Unicode macro names
stdlib: Correct Unicode handling in escript
dialyzer: Improve handling of Unicode
parsetools: Improve handling of Unicode atoms
stdlib: Handle Unicode atoms when formatting stacktraces
stdlib: Add more checks of module names to the linter
stdlib: Handle Unicode atoms better in io_lib_format
stdlib: Handle Unicode atoms in c.erl
Diffstat (limited to 'lib/stdlib/src/proc_lib.erl')
-rw-r--r-- | lib/stdlib/src/proc_lib.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/stdlib/src/proc_lib.erl b/lib/stdlib/src/proc_lib.erl index 3fa54cd0d5..9ce8e7d60e 100644 --- a/lib/stdlib/src/proc_lib.erl +++ b/lib/stdlib/src/proc_lib.erl @@ -805,16 +805,21 @@ format_exception(Class, Reason, StackTrace, {Enc,_}=Extra) -> [EI, lib:format_exception(1+length(EI), Class, Reason, StackTrace, StackFun, PF, Enc), "\n"]. -format_mfa(Indent, {M,F,Args}=StartF, Extra) -> +format_mfa(Indent, {M,F,Args}=StartF, {Enc,_}=Extra) -> try A = length(Args), - [Indent,"initial call: ",atom_to_list(M),$:,atom_to_list(F),$/, + [Indent,"initial call: ",atom_to_list(M),$:,to_string(F, Enc),$/, integer_to_list(A),"\n"] catch error:_ -> format_tag(Indent, initial_call, StartF, Extra) end. +to_string(A, latin1) -> + io_lib:write_atom_as_latin1(A); +to_string(A, _) -> + io_lib:write_atom(A). + pp_fun({Enc,Depth}) -> {Letter,Tl} = case Depth of unlimited -> {"p",[]}; |