diff options
author | Wayne Davison <wayned@samba.org> | 2006-02-06 18:42:46 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-02-06 18:42:46 +0000 |
commit | e0f4a661be6975aad65aac31910fc4c7081e46a7 (patch) | |
tree | d4184036b61e0936cc568d95ddf8d91d71ffc567 /rsync.c | |
parent | 507433f6caec010564955a8e9133effb2fc50436 (diff) | |
download | rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.tar.gz rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.tar.bz2 rsync-e0f4a661be6975aad65aac31910fc4c7081e46a7.zip |
Don't setup ic_chck if --8-bit was specified.
Diffstat (limited to 'rsync.c')
-rw-r--r-- | rsync.c | 34 |
1 files changed, 16 insertions, 18 deletions
@@ -43,6 +43,7 @@ extern int am_server; extern int am_sender; extern int am_generator; extern int am_starting_up; +extern int allow_8bit_chars; extern int preserve_uid; extern int preserve_gid; extern int inplace; @@ -66,26 +67,23 @@ static const char *default_charset(void) void setup_iconv() { - const char *defset; + if (!am_server && !allow_8bit_chars) { + const char *defset = default_charset(); - if (!am_server) - return; - - defset = default_charset(); - - /* It's OK if this fails... */ - ic_chck = iconv_open(defset, defset); + /* It's OK if this fails... */ + ic_chck = iconv_open(defset, defset); - if (verbose > 3) { - if (ic_chck == (iconv_t)-1) { - rprintf(FINFO, - "note: iconv_open(\"%s\", \"%s\") failed (%d)" - " -- using isprint() instead of iconv().\n", - defset, defset, errno); - } else { - rprintf(FINFO, - "note: iconv_open(\"%s\", \"%s\") succeeded.\n", - defset, defset); + if (verbose > 3) { + if (ic_chck == (iconv_t)-1) { + rprintf(FINFO, + "note: iconv_open(\"%s\", \"%s\") failed (%d)" + " -- using isprint() instead of iconv().\n", + defset, defset, errno); + } else { + rprintf(FINFO, + "note: iconv_open(\"%s\", \"%s\") succeeded.\n", + defset, defset); + } } } } |