[erlang-questions] Atom Unicode Support

Björn Gustavsson bjorn@REDACTED
Mon Feb 1 08:14:47 CET 2016


On Sat, Jan 30, 2016 at 9:04 PM, José Valim
<jose.valim@REDACTED> wrote:
>
> With all that said, are there any plans of supporting UTF-8 encoded atoms on
> Erlang R19? If the feature is desired but not planned, I would love to
> contribute the compiler and bytecode changes above although I will likely
> need some guidance. If that is an option, I would love to get in touch.
>

It is not planned for OTP 19. IMO, the feature is desired,
but it is probably too late for OTP 19.

Extending the BEAM format is necessary but not sufficient.
It is also necessary to make sure that other code in OTP
doesn't break. For example:

  list_to_binary(atom_to_list(Atom))

  list_to_binary(io_lib:format("~s", [Atom]))

  erlang:port_command(Port, N, atom_to_list(Atom))

list_to_atom/1 could also potentially be problematic
if the code expects an exception for any non-latin1
characters.

Other things to be done is to update the documentation
and specs.

I think that the community could help us there, both
in collecting a list of things that must be fixed
or modified, and also in helping fixing them.

/Björn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list