From patchwork Tue Feb 7 07:11:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 724949 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vHb9N1TzZz9s2G for ; Tue, 7 Feb 2017 18:11:20 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SgcC4q7w"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 75BCA4B1D0; Tue, 7 Feb 2017 08:11:18 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sZkIeQELvrdo; Tue, 7 Feb 2017 08:11:18 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDFA54AFAA; Tue, 7 Feb 2017 08:11:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C9F114AFAA for ; Tue, 7 Feb 2017 08:11:15 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KxLE6rsxIg2h for ; Tue, 7 Feb 2017 08:11:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by theia.denx.de (Postfix) with ESMTPS id 5047C4AF4C for ; Tue, 7 Feb 2017 08:11:11 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id 194so11332131pgd.0 for ; Mon, 06 Feb 2017 23:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cvZlat+FUoEGYY5I1M4skd2KOUcP5KBCfkcmm/DfMbs=; b=SgcC4q7wKPLZtq5GBNoweVOptuEDC3In6foH7/HnQeYNQal10c9dOqG0FffP5Vrn7b V9yx/F6ts4rl8Ui0ZDYQOjglJkGx7QlZQ32k+dT/e86pnGXxk0QTdPXAdNeWj8/dX1Zq 28+/XuvYN9vZvmRxOpbKaIxzGp464ImqdWWQ6G0kC04BAPyCbVcfQeRmlY3Lu88R2bCi 61c9oAN2DeVvipMAZ9c39rLYq392+Q8NRxNKqGEEibS6BQ4bFMhh4EPVPKjXBNkFFC18 PBsPv3vETOVdQnXcla/zrlitBFucLIaYraNQuzY+RkAE0pD4ez0+4jjLbW5/4iW5/tWy zO7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cvZlat+FUoEGYY5I1M4skd2KOUcP5KBCfkcmm/DfMbs=; b=ONsv1FIwcKrGv1plsSZjx3lcG6CJL7VSoNr7BLOGSjS57yMm0O3dFAFRl92PG52a08 T0L2elZipZZdjBaLgSw9glmRK1bHFDrKvzxbUDd2KRv7taKhBelY+v8mXcLjtoy3w5S6 fx+Cetmt8j5jlC9RBXbbcLJ+ZWU6oaDpAmTLLIVBM3b7Iudw56AxHCmnUiotqWVMyWkZ /f7SkUR7gPoiU+yij9BcttZoZmXVkj5+Xf5zi64qyEo9XDzdEO3HqwAh/JtjuXZ9KsyW 9ZW8UetmCTiWqE9h4zid0pep1wCASo7xb1sLq3Gskx/LALdMVrzrCxyb79e4GiSb734x /cLw== X-Gm-Message-State: AIkVDXKSO8fZS7t00Rf4eid5J3x0NYlM81cUC2VVBzfkSuBjJhHbZtNRqsWNstrhVVqRCw== X-Received: by 10.99.5.15 with SMTP id 15mr18310875pgf.109.1486451469827; Mon, 06 Feb 2017 23:11:09 -0800 (PST) Received: from chrisp-dl.atlnz.lc ([2001:df5:b000:22:7dde:999a:a254:ecb3]) by smtp.gmail.com with ESMTPSA id i82sm7932567pfk.52.2017.02.06.23.11.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Feb 2017 23:11:09 -0800 (PST) From: Chris Packham To: u-boot@lists.denx.de Date: Tue, 7 Feb 2017 20:11:00 +1300 Message-Id: <20170207071100.21495-1-judge.packham@gmail.com> X-Mailer: git-send-email 2.11.0.24.ge6920cf In-Reply-To: References: Cc: Chris Packham Subject: [U-Boot] [PATCH] patman: Handle non-ascii characters in names X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When gathering addresses for the Cc list patman would encounter a UnicodeDecodeError due to non-ascii characters in the author name. Address this by explicitly using utf-8 when building the Cc list. Signed-off-by: Chris Packham Acked-by: Simon Glass --- On Tue, Feb 7, 2017 at 4:32 AM, Simon Glass wrote: > Hi Chris, > > > This seems reasonable - can you send this as a patch please? > > Regards, > Simon Here you go. I've only been able to test with python 2.7 but I think it should be fine for python 3.x also. tools/patman/series.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/patman/series.py b/tools/patman/series.py index 38a452edad41..c1b86521aa45 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -235,7 +235,8 @@ class Series(dict): if cover_fname: cover_cc = gitutil.BuildEmailList(self.get('cover_cc', '')) - print(cover_fname, ', '.join(set(cover_cc + all_ccs)), file=fd) + cc_list = ', '.join([x.decode('utf-8') for x in set(cover_cc + all_ccs)]) + print(cover_fname, cc_list.encode('utf-8'), file=fd) fd.close() return fname