When we transported a CMS filesystem and mysql dump via rsync from one Linux server to another Linux server, we used a MacOS in the middle to store the data temporarily. After the CMS was up on the other Linux server, all static image files where available. But all filenames with German umlauts where not to be found by the CMS, although they where visible and accessible. We quickly found out, that exactly this happens:
When I create a filename with German umlauts on Linux like this:
linux$ mkdir umlauttest linux$ touch umlauttest/äöü
And then go to a Mac and issue there an rsync to copy the directory to my Mac...
mac$ rsync -a user@linux:umlauttest .
And then copy it back from my Mac to Linux:
mac$ rsync -a umlauttest/. user@linux:umlauttest2
Then I have really a problem on my Linux, because the filename is kind of broken.
linux$ diff umlauttest umlauttest2 Only in umlauttest2: äöü Only in umlauttest: äöü
That is, because MacOS is in fact converting the filename characters to composite Unicode characters, which is really something I call mangling meta data. This behaviour also arises by using
scp to copy files.
Is there a way to prevent this from happening?