Bit-syntax
@@ -662,11 +662,14 @@ Eshell V5.10.1 (abort with ^G)
containing characters having code points between 128 and 255 may
be named either as plain ISO-latin-1 or using UTF-8 encoding. As
no consistency is enforced, the Erlang VM can do no consistent
- translation of all file names. If the VM would automatically
- select encoding based on heuristics, one could get unexpected
- behavior on these systems. By default, Erlang starts in "latin1"
- file name mode on such systems, meaning bytewise encoding in file
- names. This allows for list representation of all file names in
+ translation of all file names.
+
+ By default on such systems, Erlang starts in utf8 file
+ name mode if the terminal supports UTF-8, otherwise in
+ latin1 mode.
+
+ In the latin1 mode, file names are bytewise endcoded.
+ This allows for list representation of all file names in
the system, but, for example, a file named "Ă–stersund.txt", will
appear in file:list_dir/1 as either "Ă–stersund.txt" (if
the file name was encoded in bytewise ISO-Latin-1 by the program
@@ -752,7 +755,7 @@ Eshell V5.10.1 (abort with ^G)
Notes About Raw File Names
-
+
Raw file names were introduced together with Unicode file name
support in erts-5.8.2 (OTP R14B01). The reason "raw file
names" was introduced in the system was to be able to
@@ -1014,7 +1017,8 @@ ok
allowed. This setting should correspond to the actual terminal
you are using.
The environment can also affect file name interpretation, if
- Erlang is started with the +fna flag.
+ Erlang is started with the +fna flag (which is default from
+ Erlang/OTP 17.0).
You can check the setting of this by calling
io:getopts(), which will give you an option list
containing {encoding,unicode} or
@@ -1046,8 +1050,7 @@ ok
> 255.
+fnl means bytewise interpretation of file names, which
was the usual way to represent ISO-Latin-1 file names before
- UTF-8 file naming got widespread. This is the default on all
- Unix-like operating systems except MacOS X.
+ UTF-8 file naming got widespread.
+fnu means that file names are encoded in UTF-8, which
is nowadays the common scheme (although not enforced).
+fna means that you automatically select between
@@ -1055,8 +1058,8 @@ ok
LC_CTYPE environment variables. This is optimistic
heuristics indeed, nothing enforces a user to have a terminal
with the same encoding as the file system, but usually, this is
- the case. This might be the default behavior in a future
- release.
+ the case. This is the default on all Unix-like operating
+ systems except MacOS X.
The file name translation mode can be read with the
file:native_name_encoding/0 function, which returns
@@ -1068,7 +1071,7 @@ ok
This function returns the default encoding for Erlang source
files (if no encoding comment is present) in the currently
running release. For R16 this returns latin1 (meaning
- bytewise encoding). In R17 and forward it is expected to return
+ bytewise encoding). In 17.0 and forward it returns
utf8.
The encoding of each file can be specified using comments as
described in
--
cgit v1.2.3