Skip to content

Commit 50e7fbd

Browse files
committed
process the deltas as utf8 files
1 parent 7fec675 commit 50e7fbd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Porting/merge-deltas.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ ( $master, $delta, $file )
164164
}
165165
}
166166

167-
sub slurp { return do { local @ARGV = @_; local $/; <> } }
167+
sub slurp ($file) {
168+
open my $fh, '<:utf8', $file
169+
or die "Can't open $file for reading: $!";
170+
return do { local $/; <$fh> };
171+
}
168172

169173
# MAIN PROGRAM
170174

@@ -194,7 +198,7 @@ (@argv)
194198
}
195199

196200
# save the result
197-
open my $fh, '>', $final_delta
201+
open my $fh, '>:utf8', $final_delta
198202
or die "Can't open $final_delta for writing: $!";
199203
print $fh as_pod($master);
200204

0 commit comments

Comments
 (0)