Skip to content

Commit 69fb27a

Browse files
committed
make: MIME-encode sender name when necessary
Otherwise sending the generated ITP files as is will fail for people (like me) who have non-ASCII characters in their names.
1 parent 5695d13 commit 69fb27a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

make.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"log"
9+
"mime"
910
"net/http"
1011
"net/url"
1112
"os"
@@ -689,7 +690,7 @@ func writeITP(gopkg, debsrc, debversion string) (string, error) {
689690
description = "TODO"
690691
}
691692

692-
fmt.Fprintf(f, "From: %q <%s>\n", getDebianName(), getDebianEmail())
693+
fmt.Fprintf(f, "From: %q <%s>\n", mime.QEncoding.Encode("utf-8", getDebianName()), getDebianEmail())
693694
fmt.Fprintf(f, "To: [email protected]\n")
694695
fmt.Fprintf(f, "Subject: ITP: %s -- %s\n", debsrc, description)
695696
fmt.Fprintf(f, "Content-Type: text/plain; charset=utf-8\n")

0 commit comments

Comments
 (0)