rsync output via launchd redirection has troubles with Umlauts
Hello all,
I use rsync to backup a Mac OS X 10.6.x machine to a remote QNAP NAS through a ssh-tunnel. The command:
/opt/local/bin/rsync -avz --modify-window=1 --iconv=UTF8-MAC,UTF8 --partial --delete --ignore-errors -e "ssh -a -p $qnapPort" $sourceFolder admin@$qnapURL:$destinationFolder 2>&1 | while read line
do
date "+%Y-%m-%d %H:%M:%S [rsync_backup.daily] ${line}"
done
works perfectly fine. However, there is one little problem occuring. The script is called daily by a launchd deamon. All output is redirected via launchd's StandardOutPath and StandardErrorPath to myrsync.log. The problem is that Umlaut's (äöü) are not shown correctly. They show correctly on the QNAP NAS, so there the iconv command works.
Any ideas where the problem lies?
- HFS+ uses UTF-16 while the myrsync.log is UTF-8?
- My locale is UTF-8 but should be UTF-8MAC?
- etc.
Help is appreciated.
Example:
Filename in Finder: ProdÜbersicht_V12en.doc
Filename in logfile: ProdU#314#210bersicht_V12en.doc