From: Chris Packham Date: Tue, 7 Feb 2017 20:11:00 +1300 Subject: [U-Boot] [PATCH] patman: Handle non-ascii characters in names In-Reply-To: References: Message-ID: <20170207071100.21495-1-judge.packham@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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 -- 2.11.0.24.ge6920cf