Przeglądaj źródła

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.
Raphael Hertzog 18 lat temu
rodzic
commit
572f408d18

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2008-01-22  Raphael Hertzog  <hertzog@debian.org>
+
+	* 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  <guillem@debian.org>
 
 	* configure.ac: Release 1.14.16.2.

+ 7 - 0
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 <hertzog@debian.org>  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

+ 0 - 1
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);

+ 1 - 2
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);

+ 1 - 1
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;