New file system APFS does not support the normalization of Unicode characters on file system level, so the files it is safest to call under the ASCII encoding, according to Cnews. It actually reduces the choice of name for the English language that does not require normalization. Otherwise, a number of tools and command shells will not be able to work with the file.
File system APFS provided by Apple in June 2016, does not give the user the ability to name files in any language other than English. Name of a file or folder it is better to be only of ASCII characters, otherwise this object will have problems. The fact that APFS do not support the normalization of characters from the universal character encoding systems Unicode. This affects first and foremost the written symbols of various languages that differ from English letters.
APFS were developed from scratch and is focused primarily on work with flash drives and more sophisticated encryption. Currently APFS works on all devices running iOS version 10.3 or higher. Thus, this problem occurs only on iPhone and iPad, where the user has no direct access to the files. However, as the end of 2017 APFS will be deployed in macOS, High Sierra, the experts now have the opportunity to fix the problem file name for this case.
Normalization Of Unicode
In the Unicode character encoding included the alphabets of almost all languages in the world with the alphabet and numbers, mathematical signs, etc. For each such symbol provides a unique code that makes it part of the overall system. Some characters are multiple code combinations. For example, the letter “é” can be represented in UTF-8 as two hex bytes c3 a9, and may appear as three hexadecimal bytes 65 cc 81. However, visually it is one and the same letter, and the computer should read it consistently, which requires normalization.
The files, named with non-English characters alphabets APFS believes empty
The Unicode standard includes four normalization system. Previous Apple file system called HFS+ uses the normalization form D. that is, two different “é” are converted to the same species and appear in the form of three bytes 65 cc 81. In HFS+ this is done at the file system level. Thus, everything that runs on the Mac, be it an application, command, or macOS, works with normalized file names and folders. HFS+ does not allow to create any “crazy” names.
How does APFS
In APFS normalization of characters is performed at the file system level. APFS does not change received her codeword Unicode regardless of whether they were normalized or not. Normalization is built into the system command a higher level, working with files and folders.
To avoid problems, Apple recommends that developers use to work with the file system API, high-level Foundation, such as NSFileManager, or NSURL. Or resort to functions NSURL fileSystemRepresentation objects when creating and opening files using the API on a lower level, such as POSIX, as well as when saving files APFS beyond.
The problem and its consequences
In response, the developers explain that not everything may work according to this scheme, and that some high-level APIs don’t yet support the queries needed to perform this procedure. The situation favors the emergence of APFS errors, and this risk increases when naming files, use any language except English, because the English alphabet least requires Unicode normalization. The transition from one file system to another entails a mixed normalization.
Because HFS+, the characters are normalized in the file system, the command shell don’t do that. For example, the tool Terminal itself prescribes in the name of the file café.txt a two-bit, non-normalized “é”. And tool Finder, as promised by Apple, leads the letter to trenutnom mind. Some skins can only access files and folders with normalized names, that is, they do not see the unnormalized café.txt as, for example, Icon view. Terminal sees, but has problems when performing operations with this file. Apfelstrudel believes that two files café.txt with normalized and unnormalized “é” is named the same, and the Finder – that different.
This problem can lead to failure in the work of many tools, especially because entering commands directly or using the shell is often used in macOS. Now the user can’t be 100% sure which character he now entered. To remedy the situation, you will have to implement a mechanism of normalizing the instruments, but it will not be easy.