From 572f408d18109c39bac7084f88732572053a102e Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Tue, 22 Jan 2008 18:19:18 +0100 Subject: [PATCH] Remove the IO layer ":utf8" that re-encodes in utf8 * scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl: Remove the IO-layer that converts to UTF-8. It's not as smart as I expected. --- ChangeLog | 6 ++++++ debian/changelog | 7 +++++++ scripts/dpkg-genchanges.pl | 1 - scripts/dpkg-gencontrol.pl | 3 +-- scripts/dpkg-source.pl | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 153a90af..1d7ee914 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-22 Raphael Hertzog + + * scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl, + scripts/dpkg-source.pl: Remove the IO-layer that converts to + UTF-8. It's not as smart as I expected. + 2008-01-22 Guillem Jover * configure.ac: Release 1.14.16.2. diff --git a/debian/changelog b/debian/changelog index a22bb1bd..9d9dd446 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dpkg (1.14.16.3) UNRELEASED; urgency=low + + * Remove the ":utf8" layer that utf8-encodes already valid utf8. + Closes: #462098 + + -- Raphael Hertzog Tue, 22 Jan 2008 18:15:42 +0100 + dpkg (1.14.16.2) unstable; urgency=low * Change uid after changing gid and initializing supplementary groups in diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 1fc7787f..597bed42 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -510,7 +510,6 @@ for my $f (keys %remove) { delete $fields->{$f}; } -binmode(STDOUT, ":utf8"); $substvars->parse($varlistfile) if -e $varlistfile; tied(%{$fields})->set_field_importance(@changes_fields); tied(%{$fields})->output(\*STDOUT, $substvars); diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index d6e8bef2..c6e38cc8 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -348,11 +348,10 @@ my $fh_output; if (!$stdout) { $cf= "$packagebuilddir/DEBIAN/control"; $cf= "./$cf" if $cf =~ m/^\s/; - open($fh_output, ">:utf8", "$cf.new") || + open($fh_output, ">", "$cf.new") || syserr(_g("cannot open new output control file \`%s'"), "$cf.new"); } else { $fh_output = \*STDOUT; - binmode(STDOUT, ":utf8"); } tied(%{$fields})->set_field_importance(@control_fields); diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index cbab570e..48f12bab 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -768,7 +768,7 @@ if ($opmode eq 'build') { printf(_g("%s: building %s in %s")."\n", $progname, $sourcepackage, "$basenamerev.dsc") || &syserr(_g("write building message")); - open(DSC, ">:utf8", "$basenamerev.dsc") || + open(DSC, ">", "$basenamerev.dsc") || syserr(_g("create %s"), "$basenamerev.dsc"); $substvars->parse($varlistfile) if $varlistfile && -e $varlistfile; -- 2.39.5