From 9739542cbb0542b673e6c2a30496b1dd4ee84b3f Mon Sep 17 00:00:00 2001
From: Nigel Metheringham <nigel.metheringham@dev.intechnology.co.uk>
Date: Tue, 30 Jun 2009 10:01:04 +0100
Subject: [PATCH] Changed output gz file to be :raw rather than :utf8
---
Dumper.pm | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/Dumper.pm b/Dumper.pm
index 04cff10..ed9ecb3 100644
--- a/Dumper.pm
+++ b/Dumper.pm
@@ -439,8 +439,8 @@ Usage: See Synopsis
if( $file =~ /\.xml\.gz$/i ) {
if( $COMPRESSION_AVAILABLE ) {
my $compressed_xml = Compress::Zlib::memGzip( $xml ) or die "Failed to compress xml $!";
- open FILE, ">:utf8", $file or die "Can't open '$file' for writing $!";
- binmode FILE;
+ open FILE, ">:raw", $file or die "Can't open '$file' for writing $!";
+ binmode FILE; # superflous with :raw above
print FILE $compressed_xml;
close FILE;
@@ -454,8 +454,7 @@ Usage: See Synopsis
close FILE;
}
} else {
- no warnings; # to shut Perl up about Wide characters for UTF8 output
- open FILE, ">$file" or die "Can't open '$file' for writing $!";
+ open FILE, ">:utf8", $file or die "Can't open '$file' for writing $!";
print FILE $xml;
close FILE;
}
--
1.6.2.4