From 9a35c01873fb56316136e1314ad6adffe97b9fa5 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 18 Feb 2013 15:09:00 +0100 Subject: erl_interface,ic: Remove node_org_enc from erlang_{pid,port,ref} in order to be backward compatible with user code that accesses the members of erlang_pid and friend. The documentation does not mention the content of these structs, but we have example code that does. So the safe way it the revert the node_org_enc field (added in R16A) and instead determine in runtime which atom encoding to use depending on if the node atom contains unicode (>255) characters or not. --- lib/erl_interface/doc/src/ei.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/erl_interface/doc/src') diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index dfe181bd1d..6c340378d4 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -264,7 +264,9 @@ typedef enum { The p parameter is the name of the atom with character encoding from_enc (ascii, latin1 or utf8). The name must either be zero-terminated or a function variant with a len - parameter must be used.

+ parameter must be used. If to_enc is set to the bitwise-or'd combination + (ERLANG_LATIN1|ERLANG_UTF8), utf8 encoding is only used if the atom string + can not be represented in latin1 encoding.

The encoding will fail if p is not a valid string in encoding from_enc, if the string is too long or if it can not be represented with character encoding to_enc.

These functions were introduced in R16 release of Erlang/OTP as part of a first step -- cgit v1.2.3