aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_bin_cb.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-06-30 14:32:01 +0200
committerSiri Hansen <[email protected]>2017-09-05 11:26:24 +0200
commite1310b8f92a14809dccfca1100a4bf22921991b4 (patch)
treeb93043aef49d533fdea8d19952be72378ac12256 /lib/observer/src/cdv_bin_cb.erl
parent5c5bd9e0fa4d01382da91ed146b651aa9b212d4a (diff)
downloadotp-e1310b8f92a14809dccfca1100a4bf22921991b4.tar.gz
otp-e1310b8f92a14809dccfca1100a4bf22921991b4.tar.bz2
otp-e1310b8f92a14809dccfca1100a4bf22921991b4.zip
observer: Improve handling of Unicode
Diffstat (limited to 'lib/observer/src/cdv_bin_cb.erl')
-rw-r--r--lib/observer/src/cdv_bin_cb.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/observer/src/cdv_bin_cb.erl b/lib/observer/src/cdv_bin_cb.erl
index 5472d36a6f..5502869973 100644
--- a/lib/observer/src/cdv_bin_cb.erl
+++ b/lib/observer/src/cdv_bin_cb.erl
@@ -38,6 +38,7 @@ init_bin_page(Parent,{Type,Bin}) ->
[{"Format \~p",cdv_html_wx,{Type,format_bin_fun("~p",Bin)}},
{"Format \~tp",cdv_html_wx,{Type,format_bin_fun("~tp",Bin)}},
{"Format \~w",cdv_html_wx,{Type,format_bin_fun("~w",Bin)}},
+ {"Format \~tw",cdv_html_wx,{Type,format_bin_fun("~tw",Bin)}},
{"Format \~s",cdv_html_wx,{Type,format_bin_fun("~s",Bin)}},
{"Format \~ts",cdv_html_wx,{Type,format_bin_fun("~ts",Bin)}},
{"Hex",cdv_html_wx,{Type,hex_binary_fun(Bin)}},
@@ -56,7 +57,7 @@ format_bin_fun(Format,Bin) ->
binary_to_term_fun(Bin) ->
fun() ->
try binary_to_term(Bin) of
- Term -> plain_html(io_lib:format("~p",[Term]))
+ Term -> plain_html(io_lib:format("~tp",[Term]))
catch error:badarg ->
Warning = "This binary can not be converted to an Erlang term",
observer_html_lib:warning(Warning)