rsync from Solaris to Windows (character encoding on filenames)

1

I'm trying to use RSYNC to sync files from a Solaris 9 (SunOS 5.9) System to a Windows Server 2008 R2 (via cygwin)

There are many Files containing characters like "ä", "ö", "ü" or "ß". Which are only shown correctly when Windows-Users access the Solaris-Samba-Share. Rsync shows those characters as: #201 for "ü" After copying to windows the characters become "dots" like these:

  • <-- Dot

And on solaris they look like this: ▒

Is it possible to use rsync's "--iconv"-functionality to convert the filenames into the correct format? How do I determine the filename-encoding on the solaris machine?

TomSawyer

Posted 2014-11-10T13:49:01.173

Reputation: 11

Answers

0

I faced the same problem and found, that you can use the tool convmv to find the encoding for the file and then use rsync's --iconv option.

  1. Download convmv from https://www.j3e.de/linux/convmv/ and extract
  2. Check the available encodings with convmv --list
  3. Try (or write a script) which encoding works with convmv e.g. with convmv -f iso-8859-1 -t UTF-8 /path/to/file (the return code in $? is 0 when the conversion worked and not 0 otherwise)
  4. When the right encding is found, use rsync with the --iconv parameter, e.g. rsync --iconv=ISO-8859-1,UTF-8 /source /destination

Florian Feldhaus

Posted 2014-11-10T13:49:01.173

Reputation: 218