use File::Find;
...
# there are directory d:\perl\source\test\öa and file d:\perl\source\test\öa\ü.txt under \test\
$srcdir="d:\\perl\\source\\test";
$dstdir="d:\\test2";
finddepth(\&check_and_copy, $srcdir);
# sub check_and_copy check the time of file/dir and only copy the updated file/dir to $dstdir
####
$srcdir="d:\\perl\\source\\test";
if(Encode::is_utf8($srcdir) ){
print " src is_utf8\n";
}else{
print " src is_NOT_utf8\n";
}
# I got "src is_NOT_utf8", I heared Perl use UTF8 internal. but it seems that's not so simple.
####
use utf8;
$srcdir="d:\\perl\\source\\test\\öa";
# I got "Malformed UTF-8 character (unexpected non-continuation byte 0x61, immediately after start byte 0xf6)"