saleyn / eixx

Erlang C++ Interface
Apache License 2.0
137 stars 26 forks source link

Term Marshal: ATOM_UTF8_EXT and SMALL_ATOM_UTF8_EXT #44

Closed heri16 closed 3 years ago

heri16 commented 3 years ago

Is there support for marshalling ATOM_UTF8_EXT and SMALL_ATOM_UTF8_EXT since ATOM_EXT and SMALL_ATOM_EXT has been officially DEPRECATED? (https://erlang.org/doc/apps/erts/erl_ext_dist.html#atom_utf8_ext)

Following my upgrade to OTP20, I began getting this error when attempting to connect.

Reproduce Steps

erl -sname abc &
./inst/test/test-node -n a@localhost -r abc@127.0.0.1
** 'abc@localhost': Connection attempt from node a@localhost rejected since it cannot handle ["UTF8_ATOMS"].**

Environment

Relates to CHANGELOG

From the OTP20 Release notes

In the OTP 20 release candidates the function erlang:term_to_binary/1 changed the encoding of all atoms from ATOM_EXT to ATOM_UTF8_EXT and SMALL_ATOM_UTF8_EXT. This is now changed so that only atoms actually containing unicode characters are encoded with the UTF8 tags while other atoms are encoded ATOM_EXT just as before.

and

Atoms can now contain arbitrary unicode characters which means that the DFLAG_UTF8_ATOMS capability in the distribution protocol must be supported if an OTP 20 node should accept the connection with another node or library. Third party libraries which uses the distribution protocol need to be updated with this.

See: https://github.com/massemanet/distel/issues/61

saleyn commented 3 years ago

This is fixed in latest commit.