[erlang-bugs] standard_error IO device is not being set to unicode

José Valim <>
Thu Apr 10 19:54:22 CEST 2014

Hello OTP Team,

I am using Erlang 17.0 and it seems the standard_error device is not being
set to unicode. On a Mac OS X:

1> io:format("~p~n", ["josé"]).
2> io:format(standard_error, "~p~n", ["josé"]).

If we inspect the standard_error process, we can see in the process
dictionary that unicode is set to false:

3> process_info(whereis(standard_error), dictionary).

Once I explicitly enable unicode, it works:

4> io:setopts(standard_error, [{unicode, true}]).
5> io:format(standard_error, "~p~n", ["josé"]).

Thank you!

PS: I found it interesting that the standard_error process does not accept
the same options as the standard_io one:

6> io:setopts(standard_error, [{encoding, utf8}]).
7> io:setopts(standard_error, [{unicode, true}]).
8> io:setopts(standard_io, [{unicode, true}]).
9> io:setopts(standard_io, [{encoding, utf8}]).

However this seems to be an "old" behaviour (it exists at least in R16 too).

*José Valim*
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140410/b4cce6e2/attachment.html>

More information about the erlang-bugs mailing list