rsync with 8bit filename characters or UTF8

Paul Slootman paul at debian.org
Tue Mar 8 10:27:15 GMT 2005


On Tue 08 Mar 2005, Gregory Bleiker wrote:
> 
> I'm having a problem that is driving me nuts. I am syncing directories 
> that have characters which are not 7-bit Latin encoded, ie. äöü ' and 
> the likes. I'm using a windows/cygwin client machine on one side and a 
> FreeBSD server on the other side. I use an include/exclude list to 
> specify which directories to sync.
> 
> If I have a
> 
> c:\backup\löl
> c:\backup\bla
> 
> I put
> 
> + /backup/löl
> + /backup/
> - /backup/*
> - /*
> 
> in my include/exclude file list
> 
> I then call rsync something like
> 
> rsync --include-from=files_c.inc /cygdrive/c/ 
> tester at blabla.com:data/current/c
> (some params omitted for readability's sake)
> 
> Now c:\backup\löl will not be synced because the -/backup/* rule 
> excludes it. It seems this is because rsync is seeing /backup/löl as 
> /backup/lvl, which is the non-extended ascii version of this path (ö is 
> 246 in ascii extended, 246-128=118, which is v).
> 
> I have tried putting + /backup/lvl in the include file, without success. 

You mention UTF-8... That's different from iso8859-1, which is what
you're using when you say that ö is 246 in "ascii extended".

If the filesystem stores names as UTF-8, then you need to use UTF-8 in
anything that refers to filenames.... rsync doesn't care about special
chars in filenames (or in the contents of files), it does a simple
byte-for-byte match. In UTF-8 ö will be stored as two bytes...


Paul Slootman


More information about the rsync mailing list