--- rsync-3.0.0pre1.orig/rsync.c 2007-09-24 00:19:55.000000000 +0200 +++ rsync-3.0.0pre1/rsync.c 2007-10-07 19:01:57.000000000 +0200 @@ -111,8 +111,12 @@ if (!*iconv_opt || (*iconv_opt == '.' && iconv_opt[1] == '\0')) charset = defset; - else + else { charset = iconv_opt; + if (cp) { + iconv_opt = cp + 1; + } + } if ((ic_send = iconv_open(UTF8_CHARSET, charset)) == (iconv_t)-1) { rprintf(FERROR, "iconv_open(\"%s\", \"%s\") failed\n",