diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | dgit | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 9a71c0d..5d33781 100644 --- a/debian/changelog +++ b/debian/changelog @@ -97,6 +97,8 @@ dgit (1.5~~) unstable; urgency=medium as is proper. Closes:#835858. * Get sense of failed clone failed cleanup error reporting check correct. Closes:#796773. + * When generating patch filenames from titles, first transliterate + them (lossily) to ascii. Closes:#834807. Test suite: * When sbuild fails, do not crash due to sed not finding the log diff --git a/debian/control b/debian/control index cd14b2a..294b811 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Depends: perl, libwww-perl, libdpkg-perl, git-core, devscripts, dpkg-dev, coreutils (>= 8.23-1~) | realpath, libdigest-sha-perl, dput, curl, libjson-perl, ca-certificates -Recommends: ssh-client +Recommends: ssh-client, libtext-iconv-perl Suggests: sbuild Architecture: all Description: git interoperability with the Debian archive @@ -4146,6 +4146,16 @@ sub quiltify ($$$$) { if (!defined $patchname) { $patchname = $title; $patchname =~ s/[.:]$//; + use Text::Iconv; + eval { + my $converter = new Text::Iconv qw(UTF-8 ASCII//TRANSLIT); + my $translitname = $converter->convert($patchname); + die unless defined $translitname; + $patchname = $translitname; + }; + print STDERR + "dgit: patch title transliteration error: $@" + if $@; $patchname =~ y/ A-Z/-a-z/; $patchname =~ y/-a-z0-9_.+=~//cd; $patchname =~ s/^\W/x-$&/; |