aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/group.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-01-01 16:56:22 +0100
committerHans Bolinder <[email protected]>2013-01-02 10:15:18 +0100
commitc44bc4f840f85c677eb86f00dc42c1648aaec0a6 (patch)
treef3e4bb6337559d73af91cfd75f647f23a778b3c0 /lib/kernel/src/group.erl
parent6f86a3a6ba3b975016aab80b3f5b3f2807304b24 (diff)
downloadotp-c44bc4f840f85c677eb86f00dc42c1648aaec0a6.tar.gz
otp-c44bc4f840f85c677eb86f00dc42c1648aaec0a6.tar.bz2
otp-c44bc4f840f85c677eb86f00dc42c1648aaec0a6.zip
Make sure the Erlang shell prompt can handle Unicode
Diffstat (limited to 'lib/kernel/src/group.erl')
-rw-r--r--lib/kernel/src/group.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/src/group.erl b/lib/kernel/src/group.erl
index f92c6f7208..4d2e31a429 100644
--- a/lib/kernel/src/group.erl
+++ b/lib/kernel/src/group.erl
@@ -424,7 +424,7 @@ get_password_chars(Drv,Buf) ->
end.
get_chars(Prompt, M, F, Xa, Drv, Buf, Encoding) ->
- Pbs = prompt_bytes(Prompt),
+ Pbs = prompt_bytes(Prompt, Encoding),
get_chars_loop(Pbs, M, F, Xa, Drv, Buf, start, Encoding).
get_chars_loop(Pbs, M, F, Xa, Drv, Buf0, State, Encoding) ->
@@ -688,9 +688,9 @@ edit_password([Char|Cs],Chars) ->
edit_password(Cs,[Char|Chars]).
%% prompt_bytes(Prompt)
-%% Return a flat list of bytes for the Prompt.
-prompt_bytes(Prompt) ->
- lists:flatten(io_lib:format_prompt(Prompt)).
+%% Return a flat list of characters for the Prompt.
+prompt_bytes(Prompt, Encoding) ->
+ lists:flatten(io_lib:format_prompt(Prompt, Encoding)).
cast(L, binary,latin1) when is_list(L) ->
list_to_binary(L);