Why Do Filenames Break Between Mac and Windows?
If you've ever sent a file from a Mac to a Windows PC and found that the filename looks like gibberish — garbled Korean characters, separated accents, or strange symbols — you've encountered the NFD vs NFC Unicode problem.
What Is Unicode?
Unicode is the universal standard for encoding text. It assigns a unique number (called a code point) to every character in every language. For example, the letter 'A' is U+0041, and the Korean character '한' is U+D55C.
NFC vs NFD: The Root Cause
Unicode allows some characters to be represented in two different ways:
NFC (Composed Form)
Characters are stored as a single code point. For example, 'e with acute accent' is stored as one character: U+00E9.
NFD (Decomposed Form)
Characters are broken into a base character plus combining marks. The same 'e with acute accent' becomes two code points: U+0065 (e) + U+0301 (combining acute accent).
Both forms look identical on screen but are stored differently in memory. This difference is the root cause of broken filenames.
Why Does macOS Use NFD?
Apple chose NFD for the HFS+ file system (and later APFS) because it provides a canonical decomposition that simplifies string comparison. When macOS saves a file, it automatically converts the filename to NFD. Windows and Linux, on the other hand, generally use NFC. So when you transfer a file from Mac to Windows, the filename might contain decomposed characters that Windows doesn't display correctly.
🇰🇷 Korean: The Most Visible Case
Korean is where this problem is most dramatically visible. In NFC, the syllable '한' is a single character (U+D55C). In NFD, it's decomposed into three jamo: 'ㅎ' (U+1112) + 'ㅏ' (U+1161) + 'ㄴ' (U+11AB). So a filename like '한글.txt' becomes 'ㅎㅏㄴㄱㅡㄹ.txt' on Windows — completely unreadable.
ㅎㅏㄴㄱㅡㄹ.txt한글.txt🇫🇷 French: Separated Accents
French accented characters like e, e, e, and c are affected. In NFD, 'resume.pdf' becomes 're + combining acute + sume + combining acute.pdf'. While this might look similar on some systems, it can cause issues with file searches, sorting, and some applications.
résumé.pdfrésumé.pdf🇩🇪 German: Broken Umlauts
German umlauts (o, u, a) get decomposed in NFD. 'Uber.docx' becomes 'U + combining diaeresis + ber.docx'. This can cause problems when sharing files with Windows or Linux users.
Über.docxÜber.docx🇻🇳 Vietnamese: Complex Diacritics
Vietnamese is heavily affected because characters often have multiple diacritical marks. A character like 'ệ' can be decomposed into 'e + combining circumflex + combining dot below' — three code points for one visible character.
Việt Nam.txtViệt Nam.txt🇪🇸 Spanish: The n Problem
The Spanish n (enye) is decomposed from a single U+00D1 into 'N' + combining tilde (U+0303). Similarly, accented vowels like a, e, i, o, u are all affected.
España.txtEspaña.txtWhen Does This Problem Occur?
- Sending email attachments from Mac to Windows
- Sharing files via USB drives
- Uploading to cloud storage (Google Drive, Dropbox, OneDrive)
- Transferring files over a network (NAS, SMB shares)
- Extracting ZIP files created on Mac
- Using version control systems (Git)
How FilenameFixer Solves This
FilenameFixer converts filenames from NFD to NFC using JavaScript's built-in String.prototype.normalize() method. The conversion happens entirely in your browser — no files are uploaded to any server. Your file contents remain completely untouched; only the filename is changed.
Why Process in the Browser?
Processing files in the browser means your data never leaves your device. There's no server to trust, no privacy policy to worry about, and no risk of data breaches. It also means the tool works offline and is incredibly fast.