Skip to content

Commit

Permalink
Make tools/build/gen-cat.pl utf8 aware.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jun 9, 2011
1 parent 547c431 commit b02ce6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/build/gen-cat.pl
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/perl
# Copyright (C) 2008-2011, The Perl Foundation.
# $Id$

use strict;
use warnings;
use 5.008;

binmode STDOUT, ':utf8';

my @files = @ARGV;

Expand All @@ -14,7 +16,7 @@

foreach my $file (@files) {
print "# From $file\n\n";
open(my $fh, "<", $file) or die $!;
open(my $fh, "<:utf8", $file) or die "$file: $!";
local $/;
my $x = <$fh>;
close $fh;
Expand Down

0 comments on commit b02ce6f

Please sign in to comment.