Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296141

(fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS)

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 20
    • core-libs
    • None
    • behavioral
    • minimal
    • Minor compatibility risk due to removal of file name normalization.
    • Java API
    • JDK

      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.

            bpb Brian Burkhalter
            alanb Alan Bateman
            Alan Bateman, Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: