All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] patman: encode CC list to UTF-8
Date: Tue, 25 Apr 2017 14:31:36 -0600	[thread overview]
Message-ID: <CAPnjgZ1mdpW8-pN+jHj_9N5czZxTwE15d3MkLE1NYSwwbCa88w@mail.gmail.com> (raw)
In-Reply-To: <20170425171225.GA12511@bill-the-cat>

Hi Tom,

On 25 April 2017 at 11:12, Tom Rini <trini@konsulko.com> wrote:
>
> On Sat, Apr 22, 2017 at 05:53:36PM -0600, Simon Glass wrote:
> > +Tom
> >
> > On 19 April 2017 at 07:24, Philipp Tomsich
> > <philipp.tomsich@theobroma-systems.com> wrote:
> > >
> > > This change encodes the CC list to UTF-8 to avoid failures on
> > > maintainer-addresses that include non-ASCII characters (observed on
> > > Debian 7.11 with Python 2.7.3).
> > >
> > > Without this, I get the following failure:
> > >   Traceback (most recent call last):
> > >     File "tools/patman/patman", line 159, in <module>
> > >       options.add_maintainers)
> > >     File "[snip]/u-boot/tools/patman/series.py", line 234, in MakeCcFile
> > >       print(commit.patch, ', '.join(set(list)), file=fd)
> > >   UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 81: ordinal not in range(128)
> > > from Heiko's email address:
> > >   [..., u'"Heiko St\xfcbner" <heiko@sntech.de>', ...]
> > >
> > > While with this change added this encodes to:
> > >   "=?UTF-8?q?Heiko=20St=C3=BCbner?= <heiko@sntech.de>"
> > >
> > > Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> > > ---
> > >
> > >  tools/patman/series.py | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Please put this in a PR for me, along with any other critical fixes to
> the various python tools we have, thanks!
>
> And also, do we need to perhaps whack something at a higher level, and
> more consistently, about unicode?  This is, I gather, doing UTF-8 right.
> In buildman we have a few patches to just translate to latin-1 instead.
> We should do the same thing I think, and perhaps there's a higher level
> up in the code where we need to do it too?  I don't know..

Actually I don't think we are quite there yet. This really needs a
test with all the different places strings can come from, to make sure
patman does the right thing.

Regards,
Simon

  reply	other threads:[~2017-04-25 20:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 13:24 [U-Boot] [PATCH] patman: encode CC list to UTF-8 Philipp Tomsich
2017-04-22 23:53 ` Simon Glass
2017-04-25 17:12   ` Tom Rini
2017-04-25 20:31     ` Simon Glass [this message]
2017-04-25 22:27       ` Dr. Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ1mdpW8-pN+jHj_9N5czZxTwE15d3MkLE1NYSwwbCa88w@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.