From f28539265d753bbaa473cb488e951bfe47304a01 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 12 Oct 2017 16:28:31 +0200 Subject: Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint" This reverts commit 0717a2194e863f3a78595184ccc5637697f03353, reversing changes made to 71a40658a0cef8b3e25df3a8e48a72d0563a89bf. --- lib/stdlib/doc/src/filelib.xml | 24 ----------- lib/stdlib/doc/src/filename.xml | 78 +----------------------------------- lib/stdlib/doc/src/unicode_usage.xml | 4 +- 3 files changed, 3 insertions(+), 103 deletions(-) (limited to 'lib/stdlib/doc/src') diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml index 57c4348745..80c4acffdb 100644 --- a/lib/stdlib/doc/src/filelib.xml +++ b/lib/stdlib/doc/src/filelib.xml @@ -45,30 +45,6 @@

For more information about raw filenames, see the file module.

- - -

- Functionality in this module generally assumes valid input and - does not necessarily fail on input that does not use a valid - encoding. You can validate the encoding of a filename using - filename:validate/1. -

-

- File operations used to accept filenames containing - null characters (integer value zero). This caused - the name to be truncated at the first null character. - Filenames containing null characters inside the filename - are now rejected and will cause primitive - file operations fail. -

-
-

- Currently null characters at the end of the filename - will be accepted by primitive file operations. Such - filenames are however still documented as invalid. The - implementation will also change in the future and - reject such filenames. -

diff --git a/lib/stdlib/doc/src/filename.xml b/lib/stdlib/doc/src/filename.xml index b6028fc066..14fd5ef787 100644 --- a/lib/stdlib/doc/src/filename.xml +++ b/lib/stdlib/doc/src/filename.xml @@ -46,10 +46,7 @@ filename by removing redundant directory separators, use join/1.

-

- The module supports - raw - filenames in the way that if a binary is +

The module supports raw filenames in the way that if a binary is present, or the filename cannot be interpreted according to the return value of file:native_name_encoding/0, a raw filename is also @@ -59,30 +56,6 @@ (the join operation is performed of course). For more information about raw filenames, see the file module.

- - -

- Functionality in this module generally assumes valid input and - does not necessarily fail on input that does not use a valid - encoding. You can validate the encoding of a filename using - filename:validate/1. -

-

- File operations used to accept filenames containing - null characters (integer value zero). This caused - the name to be truncated at the first null character. - Filenames containing null characters inside the filename - are now rejected and will cause primitive - file operations fail. -

-
-

- Currently null characters at the end of the filename - will be accepted by primitive file operations. Such - filenames are however still documented as invalid. The - implementation will also change in the future and - reject such filenames. -

@@ -582,55 +555,6 @@ unsafe ["a:/","msdev","include"] - - - - Validate encoding of filename - -

- Validates filename encoding. Returns true if - FileName has a valid encoding; - otherwise, returns false. -

- - Ordinary Filename - -

- Type: FileName = file:name() -

-

- Validates encoding against the - native file - name encoding, and the - capabilities of the operating system used. - Regardless of configuration and OS, null - characters (integer value zero) will be - rejected by the validation (even when only - present at the end of the filename). -

-
- Raw - Filename - -

- Type: FileName = binary() -

-

- The encoding will not be interpreted, but - null bytes (integer value zero) will be - rejected by the validation (even when only - present at the end of the filename). -

-
-
-

- For information on filename encoding see the documentation - of unicode filenames in - STDLIB - Users Guide ➜ Using Unicode in Erlang ➜ Unicode Filenames. -

-
-
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml index ff1f864e22..26dc46719e 100644 --- a/lib/stdlib/doc/src/unicode_usage.xml +++ b/lib/stdlib/doc/src/unicode_usage.xml @@ -719,8 +719,8 @@ Eshell V5.10.1 (abort with ^G)
- Unicode Filenames +

Most modern operating systems support Unicode filenames in some way. There are many different ways to do this and Erlang by default treats the different approaches differently:

@@ -855,8 +855,8 @@ Eshell V5.10.1 (abort with ^G)
- Notes About Raw Filenames +

Raw filenames were introduced together with Unicode filename support in ERTS 5.8.2 (Erlang/OTP R14B01). The reason "raw filenames" were introduced in the system was -- cgit v1.2.3