aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-11-08 17:34:41 +0100
committerPatrik Nyblom <[email protected]>2010-11-30 16:31:31 +0100
commit5da29a8c5fe9584e274d2fe9b95dead8334d419a (patch)
tree36a88b9ad8933da4039a340dcb6dbc10eb30902f
parentb9101fe19b7f8d659d266152b36cc436b90c77a3 (diff)
downloadotp-5da29a8c5fe9584e274d2fe9b95dead8334d419a.tar.gz
otp-5da29a8c5fe9584e274d2fe9b95dead8334d419a.tar.bz2
otp-5da29a8c5fe9584e274d2fe9b95dead8334d419a.zip
Correct shell utilities to handle unicode and possibly binaries
-rw-r--r--lib/stdlib/src/c.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index 399b91b92f..d04d8f191f 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -659,7 +659,7 @@ portformat(Name, Id, Cmd) ->
pwd() ->
case file:get_cwd() of
{ok, Str} ->
- ok = io:format("~s\n", [fixup_one_bin(Str)]);
+ ok = io:format("~ts\n", [fixup_one_bin(Str)]);
{error, _} ->
ok = io:format("Cannot determine current directory\n")
end.
@@ -714,7 +714,7 @@ ls_print(X, Width, Len) when Width + Len >= 80 ->
io:nl(),
ls_print(X, Width, 0);
ls_print([H|T], Width, Len) ->
- io:format("~-*s",[Width,H]),
+ io:format("~-*ts",[Width,H]),
ls_print(T, Width, Len+Width);
ls_print([], _, _) ->
io:nl().