[libconfig-model-dpkg-perl] 01/08: read/write patch in utf8 mode
dod at debian.org
dod at debian.org
Sun Jun 15 12:43:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to annotated tag debian/2.049
in repository libconfig-model-dpkg-perl.
commit a32bee007ff4e5e281831854584ce94051dde1b2
Author: Dominique Dumont <dod at debian.org>
Date: Mon Jun 2 16:46:47 2014 +0200
read/write patch in utf8 mode
---
lib/Config/Model/Backend/Dpkg/Patch.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/Config/Model/Backend/Dpkg/Patch.pm b/lib/Config/Model/Backend/Dpkg/Patch.pm
index ded39bc..f835743 100644
--- a/lib/Config/Model/Backend/Dpkg/Patch.pm
+++ b/lib/Config/Model/Backend/Dpkg/Patch.pm
@@ -51,6 +51,7 @@ sub read {
my $patch_io = IO::File->new($patch_file)
|| Config::Model::Exception::Syntax->throw(
message => "cannot read patch $patch_file" );
+ $patch_io->binmode(':utf8');
my ( $header, $diff ) = ( [],[] );
my $target = $header;
@@ -139,6 +140,7 @@ sub write {
my $io = IO::File->new($patch_file,'w')
|| Config::Model::Exception::Syntax->throw(
message => "cannot write patch $patch_file" );
+ $io->binmode(":utf8");
foreach my $elt ( $node -> get_element_name ) {
my $elt_obj = $node->fetch_element($elt) ;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list