File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ Revision history for the Perl extension Win32.
4
4
- add Win32::GetACP(), Win32::GetConsoleCP(),
5
5
Win32::GetConsoleOutputCP(), Win32::GetOEMCP(), Win32::SetConsoleCP()
6
6
and Win32::SetConsoleOutputCP(). [rt#78820] (Steve Hay)
7
+ - adjust t/Unicode.t for Cygwin 1.7, where readdir() returns
8
+ the utf8 encoded filename without setting the SvUTF8 flag [rt#66751]
9
+ [rt#74332]
7
10
8
11
0.44 [2011-01-12]
9
12
- fix memory leak introduced in 0.43
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use Test;
3
+ use Config qw( %Config) ;
3
4
use Cwd qw( cwd) ;
5
+ use Encode qw( ) ;
4
6
use Win32;
5
7
6
8
BEGIN {
@@ -48,6 +50,9 @@ ok(-f Win32::GetANSIPathName($file));
48
50
ok(opendir (my $dh , Win32::GetANSIPathName($dir )));
49
51
while ($_ = readdir ($dh )) {
50
52
next if / ^\. / ;
53
+ # On Cygwin 1.7 readdir() returns the utf8 representation of the
54
+ # filename but doesn't turn on the SvUTF8 bit
55
+ Encode::_utf8_on($_ ) if $^O eq " cygwin" && $Config {osvers } !~ / ^1.5/ ;
51
56
ok($file , Win32::GetLongPathName(" $dir \\ $_ " ));
52
57
}
53
58
closedir ($dh );
You can’t perform that action at this time.
0 commit comments