"""
Even though there is a great effort and marvelous system developed for universal character representation (unicode,
utf-8, utf-16), using these will still require platform and maybe even locale specific adjustments.

Unicode normalization is not usually relevant to paths, however that's one place where they will need to be used.
Most systems (aside from Apple) prefer NFC. We should keep the filenames normalized according to the local system.
If we fail to do it, an "é" codepoint that came from a Mac will not match an "é" codepoint typed from the keyboard
on Linux/Windows, leaving the owner scratching their head.

Normalization must only be done on paths that will be the "new" path for some file/content. Normalizing all paths,
even for queries doesn't help at all:
  - If a query would not match a path, normalization *may* fix it.
  - If a query would match a path, normalization *may* break it.
Normalization for query paths would be more trouble than help. Checking all four normalization forms may improve
cross-compatibility, but what on earth shall be done if there are more files for the same query? (not even speaking
of the exceptions of the composition or decomposition)
Basically if there are files already with mixed normalization, then they shall work as-is. New files should normalize
according to the system or Nano configuration.
"""
import sys

if sys.platform.startswith("darwin"):
    # Interestingly the Apply HFS+ filesystem enforces decomposing normalization, unlike pretty much anything else.
    # NOTE: It's unclear if a mounted NFS will be sensitive to this and may yield problems. It's also a possibility
    # that since the HFS api automatically enforces the normalization, we should not touch it at all... yet in that
    # case the NFS would still complain for some combination of normalizations if it complains for NFD.
    PLATFORM_UNICODE_NORMALIZATION = "NFD"
else:
    # Most notable Linux and Windows filesystems are normalization agnostic. Files with visually matching names
    # may exist, because there filename in bytes is different. They usually prefer to use the combined normalization.
    PLATFORM_UNICODE_NORMALIZATION = "NFC"
