From 6fe3935bc51c0fc62b2d740ac43e64ff276bbef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 17 Mar 2017 12:33:17 +0100 Subject: Update the documentation regarding Unicode atoms --- lib/stdlib/doc/src/unicode_usage.xml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'lib/stdlib') diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml index efc8b75075..a8ef8ff5c5 100644 --- a/lib/stdlib/doc/src/unicode_usage.xml +++ b/lib/stdlib/doc/src/unicode_usage.xml @@ -62,6 +62,10 @@

In Erlang/OTP 17.0, the encoding default for Erlang source files was switched to UTF-8.

+ +

In Erlang/OTP 20.0, atoms and function can contain + Unicode characters. Module names are still restricted to + the ISO-Latin-1 range.

This section outlines the current Unicode support and gives some @@ -339,9 +343,10 @@ The language

Having the source code in UTF-8 also allows you to write string - literals containing Unicode characters with code points > 255, - although atoms, module names, and function names are restricted to - the ISO Latin-1 range. Binary literals, where you use type + literals, function names, and atoms containing Unicode + characters with code points > 255. + Module names are still restricted to the ISO Latin-1 range. + Binary literals, where you use type /utf8, can also be expressed using Unicode characters > 255. Having module names using characters other than 7-bit ASCII can cause trouble on operating systems with inconsistent file naming schemes, @@ -432,15 +437,17 @@ external_charlist() = maybe_improper_list(char() | external_unicode_binary() |

Basic Language Support -

As from Erlang/OTP R16, Erlang source - files can be written in UTF-8 or bytewise (latin1) encoding. For - information about how to state the encoding of an Erlang source file, see - the epp(3) module. - Strings and comments can be written using Unicode, but functions must - still be named using characters from the ISO Latin-1 character set, and - atoms are restricted to the same ISO Latin-1 range. These restrictions in - the language are of course independent of the encoding of the source - file.

+

As from Erlang/OTP R16, Erlang + source files can be written in UTF-8 or bytewise (latin1) + encoding. For information about how to state the encoding of an + Erlang source file, see the epp(3) module. As + from Erlang/OTP R16, strings and comments can be written using + Unicode. As from Erlang/OTP 20, also atoms and functions can be + written using Unicode. Modules names must still be named using + characters from the ISO Latin-1 character set. (These + restrictions in the language are independent of the encoding of + the source file.)

Bit Syntax -- cgit v1.2.3