From 27a01d92c2be3e6c1be23f96d24c3d3358489a87 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 29 Aug 2014 17:48:25 +0200 Subject: [PATCH] Shut up "Wide character" warnings in Perl scripts --- scripts/build-remote.pl.in | 3 +++ scripts/download-from-binary-cache.pl.in | 2 ++ scripts/download-using-manifests.pl.in | 1 + scripts/nix-build.in | 2 ++ scripts/nix-channel.in | 3 +++ scripts/nix-copy-closure.in | 1 + scripts/nix-install-package.in | 3 +++ scripts/nix-prefetch-url.in | 4 ++++ scripts/nix-pull.in | 3 +++ scripts/nix-push.in | 3 +++ 10 files changed, 25 insertions(+) diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 2eb339675..faf1616e9 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -1,5 +1,6 @@ #! @perl@ -w @perlFlags@ +use utf8; use Fcntl qw(:DEFAULT :flock); use English '-no_match_vars'; use IO::Handle; @@ -9,6 +10,8 @@ use Nix::CopyClosure; use Nix::Store; no warnings('once'); +binmode STDERR, ":encoding(utf8)"; + # General operation: # diff --git a/scripts/download-from-binary-cache.pl.in b/scripts/download-from-binary-cache.pl.in index e09b051a4..cdce8eb74 100644 --- a/scripts/download-from-binary-cache.pl.in +++ b/scripts/download-from-binary-cache.pl.in @@ -1,5 +1,6 @@ #! @perl@ -w @perlFlags@ +use utf8; use DBI; use DBD::SQLite; use File::Basename; @@ -12,6 +13,7 @@ use WWW::Curl::Easy; use WWW::Curl::Multi; use strict; +binmode STDERR, ":encoding(utf8)"; Nix::Config::readConfig; diff --git a/scripts/download-using-manifests.pl.in b/scripts/download-using-manifests.pl.in index e849a930e..591cd6b43 100755 --- a/scripts/download-using-manifests.pl.in +++ b/scripts/download-using-manifests.pl.in @@ -9,6 +9,7 @@ use Nix::Utils; use POSIX qw(strftime); STDOUT->autoflush(1); +binmode STDERR, ":encoding(utf8)"; my $logFile = "$Nix::Config::logDir/downloads"; diff --git a/scripts/nix-build.in b/scripts/nix-build.in index fb92a4909..f8cf318ff 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -1,10 +1,12 @@ #! @perl@ -w @perlFlags@ +use utf8; use strict; use Nix::Config; use Nix::Store; use Nix::Utils; +binmode STDERR, ":encoding(utf8)"; my $dryRun = 0; my $verbose = 0; diff --git a/scripts/nix-channel.in b/scripts/nix-channel.in index 407f27490..e45b91338 100755 --- a/scripts/nix-channel.in +++ b/scripts/nix-channel.in @@ -1,11 +1,14 @@ #! @perl@ -w @perlFlags@ +use utf8; use strict; use File::Basename; use File::Path qw(mkpath); use Nix::Config; use Nix::Manifest; +binmode STDERR, ":encoding(utf8)"; + Nix::Config::readConfig; my $manifestDir = $Nix::Config::manifestDir; diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in index 10c2a9171..f4d186256 100755 --- a/scripts/nix-copy-closure.in +++ b/scripts/nix-copy-closure.in @@ -6,6 +6,7 @@ use Nix::Store; use Nix::CopyClosure; use List::Util qw(sum); +binmode STDERR, ":encoding(utf8)"; if (scalar @ARGV < 1) { print STDERR <