+
+ #
+ # This is a hack. To avoid wide chars we encode the arguments
+ # to utf8 byte streams, then to the client's local charset.
+ # The second conversion should really go in File::RsyncP, since
+ # it shouldn't be applied to in-line include/exclude arguments.
+ #
+ for ( my $i = 0 ; $i < @{$rs->{rsyncArgs}} ; $i++ ) {
+ $rs->{rsyncArgs}[$i] = encode('utf8', $rs->{rsyncArgs}[$i]);
+ from_to($rs->{rsyncArgs}[$i], 'utf8', $conf->{ClientCharset})
+ if ( $conf->{ClientCharset} ne "" );
+ }
+
+ ##my $str = "RsyncArgsBefore: " . join(" ", @{$rs->{rsyncArgs}}) . "\n";
+ ##$t->{XferLOG}->write(\$str);
+