Hi All
Despite the fact I’m setting +pc unicode
(in vm.args
) in my rebar3 based release , it doesn’t seem to have any effect:
$ echo $LANG
en_US.UTF-8
~$ /app/bin/mirakle eval 'lists:keyfind(encoding, 1, io:getopts()).'
{encoding, latin1}
To make it work, I have to connect to the node and explicitly set it:
~$ app/bin/mirakle remote_console
...
> ok = io:setopts([{encoding, unicode}]).
This blog post (Printing non-ascii characters in Erlang releases) encountered the same issue:
[…] I first checked the shell environment, but
os:getenv("LANG")
correctly returnsen_US.UTF-8
in both cases. I then suspected the Erlang VM was initialized with a different+pc
flag in console mode, but adding+pc unicode
tovm.args
did not change anything.
My rebar3 based release runs in foreground
mode.
What am i missing?
Help appreciated
/Z