Summary
Suppress file name normalization by default on macOS and add a property to enable it.
Problem
Prior to macOS 10.13, file names were normalized to Unicode Normalization Form D. With the change of default file system type from HFS+ to APFS, this normalization was dropped. Hence there is no longer a need to continue to so normalize file names in java.nio.file.Path
.
Solution
By default, do not normalize file names on macOS in the java.nio.file.Path
implementation. Introduce a system property jdk.nio.path.useNormalizationFormD
to turn such normalization back on if so desired. The property is undefined by default, and would be true
if and only if its string value is "true" in a case insensitive sense.
Specification
Running with -Djdk.nio.path.useNormalizationFormD
or -Djdk.nio.path.useNormalizationFormD=true
will use canonical decomposition normalization form D when encoding path strings to bytes to access files. This restores the behavior of older JDK releases that was appropriate for older macOS releases when HFS+ was the default file system.
- csr of
-
JDK-8289689 (fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS)
- Resolved