From: Jonathan Corbet <corbet@lwn.net>
To: Nishanth Menon <nm@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: "Ravikumar, Rahul" <r-ravikumar@ti.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-spdx <linux-spdx@vger.kernel.org>,
Nishanth Menon <nm@ti.com>
Subject: Re: [PATCH V2] scripts/spdxcheck.py: Strictly read license files in utf-8
Date: Mon, 12 Jul 2021 09:58:55 -0600 [thread overview]
Message-ID: <87y2abr0ao.fsf@meer.lwn.net> (raw)
In-Reply-To: <20210707204840.30891-1-nm@ti.com>
Nishanth Menon <nm@ti.com> writes:
> Commit bc41a7f36469 ("LICENSES: Add the CC-BY-4.0 license")
> unfortunately introduced LICENSES/dual/CC-BY-4.0 in UTF-8 Unicode text
> While python will barf at it with:
>
> FAIL: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128)
> Traceback (most recent call last):
> File "scripts/spdxcheck.py", line 244, in <module>
> spdx = read_spdxdata(repo)
> File "scripts/spdxcheck.py", line 47, in read_spdxdata
> for l in open(el.path).readlines():
> File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
> return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2109: ordinal not in range(128)
>
> While it is indeed debatable if 'Licensor.' used in the license file
> needs unicode quotes, instead, force spdxcheck to read utf-8.
>
> Reported-by: Rahul T R <r-ravikumar@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
I've applied this, thanks.
jon
prev parent reply other threads:[~2021-07-12 15:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 20:48 [PATCH V2] scripts/spdxcheck.py: Strictly read license files in utf-8 Nishanth Menon
2021-07-12 15:58 ` Jonathan Corbet [this message]
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=87y2abr0ao.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spdx@vger.kernel.org \
--cc=nm@ti.com \
--cc=r-ravikumar@ti.com \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).