Mac OS uses NFD encoded accents, but doesn't see file or directory names with NFD encoded accents over the network! So files with accents received from Macs and saved from Windows to a Windows share will not be visible from a Mac. The file names must be re-encoded in the NFC form.
find . | perl -CS -MFile::Basename -MUnicode::Normalize -nle 'next if (/^[A-Za-z\d\_\. \-\/]+$/); $b=basename($_); $nfc=NFC($b); print if ($nfc ne $b)'
(Add --notest
to actually do the renaming)
convmv -r -f utf8 -t utf8 --nfc .
This attachemnt in an email, saved using Thunderbird on Windows 10:
X-Mailer: Apple Mail (2.3445.104.11) --Apple-Mail=_E5FEA672-E21A-4900-BF9B-B898012144D1 Content-Disposition: inline; filename*=utf-8''DCP%20Infos%20Saarbru%CC%88cken.png Content-Type: image/png; x-unix-mode=0644; name="=?utf-8?Q?DCP_Infos_Saarbru=CC=88cken=2Epng?="
Whether saved directly to the SMB share or locally on Windows, and then copied to the share, the ΓΌ retains it's NFD form as in the header file name.