Synology NAS has native support for HFS file systems (Apple’s previous standard file system). So, it is possible to connect a HFS-formatted external USB drive to a Synology NAS and directly copy the files to the NAS. However, there is one big issue: Mac OS applies another character encoding (utf-8-mac or utf8-D) to file (and folder) names, than standard unix systems (utf8-C). (More on that here.) This is not a problem for standard characters, but leads to some severe problems with special characters like Umlaute (äüöß). When copying files from Mac OS Finder to a SMB share, Mac OS automatically takes care of the different encodings and stores files UTF8-C encoded on the remote directory.
However, when copying directly from a HFS-formatted USB drive connected to the Synology NAS, the Synology NAS does not account for this particularity and leaves filename encoding unchanged. The Synology Web File Station is capable of displaying UTF8-D encoded special characters correctly. However, when trying to access UTF8-D encoded files/folders via SMB from Mac OS Finder, these folders appear empty or the files appear corrupt.
The solution: convmv
Fortunately, there is a tool available, which allows to bulk repair the encodings: convmv. (More on that here and here.) This tool does not need installation. It can be simply downloaded and executed on the the Synology NAS.
#Download and Extract #Manually check if more recent version available wget https://www.j3e.de/linux/convmv/convmv-2.05.tar.gz tar xzvf convmv-2.05.tar.gz cd convmv-2.05 #Runs the tool ./convmv #Dryrun of converting from UTF8-D (Mac) to UTF8-C (Unix/NAS) ./convmv -r -f utf8 -t utf8 --nfc /path/to/dir #Dryrun of converting from UTF8-C (Unix/NAS) to UTF8-D (Mac) ./convmv -r -f utf8 -t utf8 --nfd /path/to/dir #Actually Execute the command (no dryrun) ./convmv -r -f utf8 -t utf8 --nfc --notest /path/to/dir
If you use rsync to sync files between HFS and Unix file systems, rsync supports the reencoding. If you run rsync from Mac OS, you first need to update rsync to the most recent version. Therefore, you need homebrew.
#Stanard Mac OS rsync version too old rsync --version #Install Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" #Install most recent rsync version brew install rsync #Quit and Restart Terminal #Rsync Version now is fin rsync --version #Run Rsync with --iconv=SOURCE,DEST rsync --iconv=utf-8-mac,utf-8 SOURCE DEST