I'm using cygwin to backup files from a windows machine to a unix host with rsync. I originally uploaded the bulk of the files using a windows ftp client, and then planned on doing updates nightly with rsync. Some of the filenames have strange characters in them, such as the trademark symbol, and other characters, such as European letters. Rsync doesn't like the filenames as they exist on the server; it deletes them and uploads the same files with escaped characters in the filename. I was looking for what switch to use to tell rsync to use a windows character set, and it seems like I need to use is --iconv, but i'm unsure what character set windows uses ( this is xp ), or in other words, what the argument should be. I suppose one solution is to let rsync be in charge of the filename character sets, but I want to make sure that if we have to pull from our rsync backup, that we aren't getting strange characters. My upload isn't finished yet, so I haven't be able to test a download. -- "Computers are useless. They can only give you answers" -- Pablo Picasso
Hi Steve - I posted a similar question a few days ago as I was getting warnings like: 28/11/2008 15:47:16 mdworker[1065] (Warning) Import: Bad path:/Volumes/ backup_hd/Backups/xxxxxxxx-4.local/Profiles/XXXXXXXX/daily.0/Start Menu/current/$my/Sudtirol/S?dtirol.xls In this path the file name "S?dtirol.xls" (with u umlaut) has its umlaut replaced by "?" (black diamond with a question mark). I added comments in brackets as I'm not sure how these characters will print on other peoples screens. I'm very interested in the outcome of this issue. Cheers Michael On 1 Dec 2008, at 17:15, Steve Lefevre wrote:> I'm using cygwin to backup files from a windows machine to a unix host > with rsync. I originally uploaded the bulk of the files using a > windows ftp client, and then planned on doing updates nightly with > rsync. > > Some of the filenames have strange characters in them, such as the > trademark symbol, and other characters, such as European letters. > Rsync doesn't like the filenames as they exist on the server; it > deletes them and uploads the same files with escaped characters in the > filename. > > I was looking for what switch to use to tell rsync to use a windows > character set, and it seems like I need to use is --iconv, but i'm > unsure what character set windows uses ( this is xp ), or in other > words, what the argument should be. > > I suppose one solution is to let rsync be in charge of the filename > character sets, but I want to make sure that if we have to pull from > our rsync backup, that we aren't getting strange characters. My upload > isn't finished yet, so I haven't be able to test a download. > > -- > "Computers are useless. They can only give you answers" > -- Pablo Picasso > -- > Please use reply-all for most replies to avoid omitting the mailing > list. > To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync > Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html-------------- next part -------------- HTML attachment scrubbed and removed
Steve Lefevre wrote:> I'm using cygwin to backup files from a windows machine to a unix host > with rsync. I originally uploaded the bulk of the files using a > windows ftp client, and then planned on doing updates nightly with > rsync.This can also be important, especially regarding how the ftp server is configured - as it might have converted some of the filenames itself to the locale used on your unix - for example extended vsftpd builds have full iconv functionality themselves. From win32's side, and if you don't use utf8 "modified" cygwin1.dll ( http://www.okisoft.co.jp/esc/utf8-cygwin/ ), filenames will be converted according to the "reginal and language options" -> "advanced" setting whenever non-unicode win32 api is used, as far as I know - so that would include standard cygwin and cli ftp client on windows. Modified cygwin1.dll certainly simplifies life (I've been using it for quite a while), as everything coming from win32 will be in utf8, and coming to win32 should be in utf8. Dll will take the care of the conversion to native unicode used on win32, and legacy regional options will be irrelevant then.> > I was looking for what switch to use to tell rsync to use a windows > character set, and it seems like I need to use is --iconv, but i'm > unsure what character set windows uses ( this is xp ), or in other > words, what the argument should be. >If you decide to use mentioned cygwin1.dll , and your linux operates in utf8 by default, you shouldn't need anything else. If you use some legacy locale on unix - --iconv=.,utf8 should do the thing - assuming win32 is remote machine, and locale is set properly on unix machine. Otherwise, it's up to you and --iconv / --no-iconv . The latter should work perfectly fine as well (ignoring filename adjustments completely - unix shouldn't have any problems with storing any filenames), although locale-aware programs (ls, etc.) might display them with a bit of weirdness. Even simple tab-completion (under e.g. bash) will depend on locale and inputrc settings as well.