This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=caad4722262bcb5bd083d05a3df435c8f46eead8

commit caad4722262bcb5bd083d05a3df435c8f46eead8
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Jan 30 23:38:41 2023 +0100

    dpkg-genchanges: Replace Encode usage with utf8 encode/decode functions
    
    In Debian this module is not part of the perl-base essential package,
    switch to use the encode/decode functions from the utf8 functions
    instead.
    
    Changelog: internal
---
 scripts/dpkg-genchanges.pl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index e1a8d856b..d724dea9e 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -23,7 +23,6 @@ use strict;
 use warnings;
 
 use List::Util qw(any all none);
-use Encode;
 use POSIX qw(:errno_h :locale_h);
 
 use Dpkg ();
@@ -137,8 +136,10 @@ sub format_desc
     # XXX: This does not correctly truncate characters based on their width,
     # but on the number of characters which will not work for wide ones. But
     # we do not have anything better in perl core.
-    my $line = encode_utf8(sprintf('%-10s - %-.65s', $pkgname,
-                                   decode_utf8($desc)));
+    utf8::decode($desc);
+    my $line = sprintf '%-10s - %-.65s', $pkgname, $desc;
+    utf8::encode($line);
+
     $line .= " ($pkgtype)" if $pkgtype ne 'deb';
 
     return $line;

-- 
Dpkg.Org's dpkg

Reply via email to