← All articles

Unicode normalization filenames: the shared-drive duplicates

If a shared folder shows two files called José - Q3 budget.xlsx, one of which refuses to open, or Windows search cannot find a file you can plainly see, you are looking at a Unicode normalization filenames problem. A colleague on a Mac saved a name that contains an accent, umlaut, Korean syllable or Japanese kana in decomposed form (NFD). Windows, most Linux servers and many web services expect the composed form (NFC). Both names look identical on screen but are different strings of bytes, so the drive stores them side by side. The fix is to rename the affected files once into NFC, then agree on a few habits so it stops happening.

Why Unicode normalization filenames collide on shared storage

Unicode allows two ways to write the same character. é can be a single code point (U+00E9, the composed or NFC form) or a plain e followed by a combining acute accent (U+0065 U+0301, the decomposed or NFD form). The same applies to ë in Zoë, ü in Müller, the dakuten in Japanese が, and every Korean syllable, which decomposes into its individual jamo (한글 becomes ㅎㅏㄴㄱㅡㄹ in the raw bytes).

macOS has historically stored filenames in NFD, and many Mac apps and the Finder still create them that way. Windows types and stores names in NFC. Each operating system displays the other form correctly, which is exactly why nobody notices until the files meet on a shared volume:

  • SMB shares and NAS boxes (Synology, QNAP, a Windows file server, a Samba share on Linux). The file system stores whatever bytes the client sends. A Mac saves the NFD version, a Windows user later saves the NFC version, and now there are two files. Neither client treats them as the same name.
  • Google Drive, Dropbox, OneDrive. Desktop sync clients compare names between machines. Depending on the client and version, an NFD name from a Mac and an NFC name from a PC may be treated as different files, producing "conflicted copy" files or a silent duplicate. Searching for the name in the web interface may return only one of them.
  • Slack, Teams, email. An attachment keeps the filename the sender's machine gave it. A Windows user who downloads Résumé - Zoë.pdf from a Mac colleague gets an NFD name on their disk. It opens fine, but if they later type the same name to look for it, Windows search does not match.
  • Scripts, build tools and Git. Anything that compares strings byte for byte sees two different paths. Git on a Mac can report an accented file as deleted and re-added, or refuse to find a file that a Windows teammate committed.

The important point is that nothing is corrupt. Every file is intact. Only the names disagree about how to spell the same letters.

How to tell which copy is the NFD one

Before renaming anything, confirm the diagnosis. You cannot see the difference by eye, so you have to look at the code points.

On Windows (PowerShell)

  1. Open the folder in File Explorer, click the address bar, type powershell and press Enter.
  2. Run:
    Get-ChildItem | ForEach-Object { "$($_.Name) -> $([int[]][char[]]$_.Name -join ' ')" }
    
  3. Compare the two duplicates. The NFC version of é shows as 233. The NFD version shows as 101 769 (an e plus a combining accent). Korean NFC syllables appear as single numbers in the 44032–55203 range; NFD ones appear as runs of numbers between 4352 and 4607.

On a Mac (Terminal)

  1. Open Terminal and cd into the folder (you can type cd , then drag the folder from Finder into the window).
  2. Run:
    python3 -c "import os,unicodedata as u; [print(n, 'NFD' if n!=u.normalize('NFC',n) else 'NFC') for n in os.listdir('.')]"
    
  3. Every name flagged NFD is one that Windows and Linux will treat as a different file from its NFC twin.

Quick check without a terminal

Copy the filename from the file's Properties or Get Info panel and paste it into the text converter on the FilenameFixer web app. If the converted text differs from what you pasted, the name was in NFD. The conversion happens in your browser; nothing is sent to a server.

Fixing the files you already have

Decide first which copy is the current one. Open both, check the modification dates, and keep the newer or more complete file. Then make the surviving name NFC.

Option 1: retype the name on Windows

Right-click the file, choose Rename, delete the whole name and type it again from the keyboard. Windows produces NFC when you type, so a freshly typed name is always in the expected form. This is fine for one or two files and needs no tools. It does not work if you paste the old name back in, because pasting preserves the NFD bytes.

Option 2: batch rename on the Mac before the files reach the share

If the files originate on a Mac, fix them at the source. Open the FilenameFixer web app, drag the files or a whole folder onto the page, and download or save them with their names converted to NFC. It is free, works on batches, and because it runs locally in the browser the files themselves do not leave your computer. This is the practical route when a designer or translator is about to drop fifty assets with accented or Korean names into a shared folder.

Option 3: command line on a Linux NAS or server

If you have shell access to the NAS or Samba server, convmv normalizes names in place:

convmv -f utf8 -t utf8 --nfc -r /volume1/shared/project

Run it first without --notest to see what it would change, then add --notest to apply. Python's unicodedata.normalize('NFC', name) in a short os.rename loop does the same job where convmv is not installed.

Option 4: PowerShell for a whole Windows folder

Get-ChildItem -Recurse | Where-Object { $_.Name -ne $_.Name.Normalize('FormC') } |
  ForEach-Object { Rename-Item $_.FullName $_.Name.Normalize('FormC') }

If the NFC twin already exists, Rename-Item fails for that file, which is a useful safety net: it forces you to merge the two copies deliberately instead of overwriting one.

ZIP archives shared through Slack or email

When the duplicates arrive inside a ZIP that a Mac user compressed, unpacking on Windows reproduces the problem in every extracted folder. Rather than renaming after extraction, you can run the archive through the ZIP filename restore tool (archives up to 200 MB), which rewrites the entries to NFC and gives you back a ZIP that extracts cleanly.

Preventing the next round of duplicates

Renaming is a one-time cleanup. These habits keep the share clean afterwards.

  1. Normalize on upload. If your team works mostly in Google Drive, Slack or a browser-based DMS, Mac users can install the FilenameFixer Chrome extension. It converts filenames to NFC automatically whenever a file is uploaded through a website, so the NFD name never reaches the service in the first place.
  2. Set core.precomposeUnicode in Git on every Mac. Run git config --global core.precomposeUnicode true. Git then converts NFD paths to NFC before storing them, which stops the phantom delete-and-add churn between Mac and Windows contributors.
  3. Pick one person to create shared folders and templates. Folder names are copied far more often than file names. If the project root is Évaluation 2026 in NFD, every subfolder a Mac user creates inherits the problem. Creating the structure from a Windows machine, or normalizing it once, removes a large share of future duplicates.
  4. Prefer plain ASCII in long-lived shared paths. This is not always acceptable, especially for Korean or Japanese teams, and nobody should have to anglicize their own name. But for internal identifiers such as 2026-Q3-budget rather than Budget été 2026, dropping diacritics costs nothing and avoids the issue entirely.
  5. Watch for the symptom, not the cause. "Search can't find it", "the sync says conflicted copy", "two identical files and one is 0 bytes" are all the same bug. When a teammate reports one of these, check the code points before anyone starts deleting files.

None of this requires buying software. Retyping names, PowerShell, convmv and the Git setting are all built in or free. FilenameFixer earns its place when the volume is large, when the files have not left the Mac yet, or when you want the conversion to happen silently at upload time instead of being one more thing to remember.