aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/doc/src/ei.xml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_interface/doc/src/ei.xml')
-rw-r--r--lib/erl_interface/doc/src/ei.xml12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index 0b0b1eeb79..e9c7c644b5 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -94,7 +94,11 @@ enum erlang_char_encoding {
ERLANG_ASCII, ERLANG_LATIN1, ERLANG_UTF8, ERLANG_WHATEVER
};
</code>
- <p>The character encoding used for atoms.</p>
+ <p>The character encoding used for atoms. <c>ERLANG_ASCII</c> represents 7-bit ASCII.
+ Latin1 and UTF8 are different extensions of 7-bit ASCII. All 7-bit ASCII characters
+ are valid Latin1 and UTF8 characters. ASCII and Latin1 both represent each character
+ by one byte. A UTF8 character can consist of one to four bytes. <c>ERLANG_WHATEVER</c>
+ is not an encoding but rather used as a wildcard.</p>
</item>
</taglist>
</section>
@@ -256,11 +260,11 @@ enum erlang_char_encoding {
<p>Encodes an atom in the binary format with character encoding
<c><seealso marker="#erlang_char_encoding">to_enc</seealso></c> (latin1 or utf8).
The <c>p</c> parameter is the name of the atom with character encoding
- <c><seealso marker="#erlang_char_encoding">from_enc</seealso></c>.
+ <c><seealso marker="#erlang_char_encoding">from_enc</seealso></c> (ascii, latin1 or utf8).
The name must either be zero-terminated or a function variant with a <c>len</c>
parameter must be used.</p>
- <p>The encoding will fail if the atom is too long or if it can not be represented
- with character encoding <c>to_enc</c>.</p>
+ <p>The encoding will fail if <c>p</c> is not a valid string in encoding <c>from_enc</c>,
+ if the string is too long or if it can not be represented with character encoding <c>to_enc</c>.</p>
<p>These functions were introduced in R16 release of Erlang/OTP as part of a first step
to support UTF8 atoms. Atoms encoded with <c>ERLANG_UTF8</c>
can not be decoded by earlier releases than R16.</p>