macOS vs Linux Filename Mismatch: Same Visible Name Fails Lookup (Unicode NFC vs NFD)

macOS HFS+/APFS decomposes accented characters (NFD) while Linux uses precomposed NFC.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: macOS vs Linux Filename Mismatch Platform: Data
Common Root Causes:
  • macOS HFS+/APFS decomposes accented characters (NFD) while Linux uses precomposed NFC.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Normalize user strings and filenames to Unicode `NFC` before comparing or hashing.
Safe Diagnostic Command:
python3 -c "import unicodedata; print(unicodedata.normalize('NFC', s))"
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

macOS HFS+/APFS decomposes accented characters (NFD) while Linux uses precomposed NFC. Recommended diagnostic: `python3 -c "import unicodedata; print(unicodedata.normalize('NFC', s))"`. Remediation: Normalize user strings and filenames to Unicode `NFC` before comparing or hashing.

Worked Examples

  • Run `python3 -c "import unicodedata; print(unicodedata.normalize('NFC', s))"` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-data-unicode-nfc-nfd-filename · Independently verified: 2026-11-25

Related Resources