summaryrefslogtreecommitdiff
path: root/ext/Encode/t/Unicode.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Encode/t/Unicode.t')
-rw-r--r--ext/Encode/t/Unicode.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/Encode/t/Unicode.t b/ext/Encode/t/Unicode.t
index 3329d7c650..882d700985 100644
--- a/ext/Encode/t/Unicode.t
+++ b/ext/Encode/t/Unicode.t
@@ -116,13 +116,16 @@ my @file = sort grep {/\.utf$/o} readdir $dh;
closedir $dh;
for my $file (@file){
my $path = File::Spec->catfile($dir, $file);
-+ open my $fh, '<', $path or die "$path:$!";
+ open my $fh, '<', $path or die "$path:$!";
+ my $content;
if (PerlIO::Layer->find('perlio')){
binmode $fh => ':utf8';
- }else{
+ $content = join('' => <$fh>);
+ }else{ # ugh!
binmode $fh;
+ $content = join('' => <$fh>);
+ Encode::_utf8_on($content)
}
- my $content = join('' => <$fh>);
close $fh;
is(decode("UTF-7", encode("UTF-7", $content)), $content,
"UTF-7 RT:$file");