chiark / gitweb /
Test suite: stunt parsechangelog: Some commented-out debugging
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 469f6bfe5572ad718439eb8024719d1d0a325bcb..5bd39e70a84b92086d35041c0f4c4fd64ddb75f7 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2,7 +2,7 @@
 # dgit
 # Integration between git and Debian-style archives
 #
-# Copyright (C)2013-2015 Ian Jackson
+# Copyright (C)2013-2016 Ian Jackson
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -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-$&/;