Skip to content

Instantly share code, notes, and snippets.

@JamesChevalier
Last active April 14, 2026 12:51
Show Gist options
  • Select an option

  • Save JamesChevalier/8448512 to your computer and use it in GitHub Desktop.

Select an option

Save JamesChevalier/8448512 to your computer and use it in GitHub Desktop.
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

Convert all files in a directory from NFC to NFD:

convmv -r -f utf8 -t utf8 --nfd --notest .

@s2k
Copy link
Copy Markdown

s2k commented May 4, 2021

Very nice tip!
On my Mac, I used brew install convmv, BTW.

@igorsgm
Copy link
Copy Markdown

igorsgm commented May 13, 2021

You saved my day. Thank you!

@simnalamburt
Copy link
Copy Markdown

simnalamburt commented Jun 16, 2023

Take a look at https://github.com/cr0sh/jaso for a faster alternative written in Rust.

$ brew install simnalamburt/x/jaso
$ jaso .
DONE; 100 files in 1.111529301 seconds

@elmimmo
Copy link
Copy Markdown

elmimmo commented Mar 4, 2025

Just for reference, there is also NFCFN.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment