aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/doc
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-01-22 19:25:36 +0100
committerSverker Eriksson <[email protected]>2013-01-22 19:34:03 +0100
commit1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1 (patch)
treebf152c1b3dbf855dfc5a8724c3e043e161a971b6 /lib/erl_interface/doc
parent8eb544073fe243a8935a54f83f9c9f1f7478e3c5 (diff)
downloadotp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.tar.gz
otp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.tar.bz2
otp-1f4765cca4874fa92fcfad888fbe6d5f2fbf74d1.zip
erl_interface: even more utf8 atom stuff
Diffstat (limited to 'lib/erl_interface/doc')
-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>