Changeset 23464
- Timestamp:
- 2010-12-13T16:12:56+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test-collections/trunk/filename-encodings/bin/script/dirlist.pl
r23346 r23464 1 1 #!/usr/bin/perl -w 2 2 3 use strict;4 3 4 use Encode; 5 5 6 6 sub debug_unicode_string … … 31 31 close(DIN); 32 32 33 #open(FOUT,">file-list.txt")34 # || die "Unable to open file-list.txt";35 36 33 foreach my $f (@files) 37 34 { … … 41 38 my $dirsep = ($^O =~ /mswin/i) ? "\\" : "/"; 42 39 43 # Remove trailing directory separator44 # (will be explicitly added in later on)45 40 $f =~ s@$dirsep$@@; 46 41 47 if ( -e "$dir$dirsep$f" ) { 48 print " Perl can see file $dir$dirsep$f\n"; 42 my $full_f = "$dir$dirsep$f"; 43 if ($^O =~ /mswin/i) { 44 require Win32; 45 $full_f = Win32::GetLongPathName($full_f); 46 #$full_f = encode("UTF8",$full_f); 47 print "Windows full filename: ", $full_f,"\n"; 48 print "Windows full filename debug: ", debug_unicode_string($full_f),"\n"; 49 50 $full_f = Win32::GetShortPathName($full_f); 51 } 52 53 if ( -e $full_f ) { 54 print " Perl can see file $full_f\n"; 49 55 } 50 56 else { 51 print " Perl CANNOT see $ dir$dirsep$f\n";57 print " Perl CANNOT see $full_f\n"; 52 58 } 53 # print FOUT "$f\n";54 59 } 55 60 56 #close(FOUT); 61
Note:
See TracChangeset
for help on using the changeset viewer.