Permalink
Browse files

Make tools/build/gen-cat.pl utf8 aware.

  • Loading branch information...
1 parent 547c431 commit b02ce6f6ee4b9e4822205d7688f7301125149b51 @pmichaud pmichaud committed Jun 9, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 tools/build/gen-cat.pl
View
@@ -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;
@@ -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;

0 comments on commit b02ce6f

Please sign in to comment.