Author: adsb
Date: 2009-08-19 22:10:20 +0000 (Wed, 19 Aug 2009)
New Revision: 1966

Modified:
   trunk/debian/changelog
   trunk/scripts/debchange.pl
Log:
debchange: Don't output spurious characters when extended Unicode
characters are passed on the command line.  (Closes: #542484)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2009-08-18 04:44:56 UTC (rev 1965)
+++ trunk/debian/changelog      2009-08-19 22:10:20 UTC (rev 1966)
@@ -27,6 +27,8 @@
       - Add --dpkg-opts support for passing options on to dpkg.
       - Autoclean the apt-cache so it doesn't grow unbounded.
   * dcmd: Add filtering options for udebs.  (Closes: #541827)
+  * debchange: Don't output spurious characters when extended Unicode
+    characters are passed on the command line.  (Closes: #542484)
   * dget: Update the dpkg-source output matching to enable --build to work
     again.  (Closes: #541409)
   * Packaging changes: Add sensible-utils to Recommends.  Several scripts

Modified: trunk/scripts/debchange.pl
===================================================================
--- trunk/scripts/debchange.pl  2009-08-18 04:44:56 UTC (rev 1965)
+++ trunk/scripts/debchange.pl  2009-08-19 22:10:20 UTC (rev 1966)
@@ -1453,11 +1453,15 @@
     my $newentry=shift;
 
     # Work around the fact that write() with formats
-    # seems to assume that character == byte
+    # seems to assume that characters are 7-bit
     # See http://rt.perl.org/rt3/Public/Bug/Display.html?id=33832
-    # and Debian bug #473769
+    # and Debian bugs #473769 and #541484
+    # High-bit single characters need an extra space adding per
+    # character, extended Unicode characters two
     my $count = () = $CHGLINE =~ /[^\x00-\x7F]/mg;
     $CHGLINE .= " " x $count;
+    $count = () = $CHGLINE =~ /[\x{0100}-\x{ffff}]/mg;
+    $CHGLINE .= " " x $count;
 
     print O "\n" if $opt_news && ! ($newentry || $linecount);
     $linecount++;



-- 
To unsubscribe, send mail to [email protected].

Reply via email to