Nishanth Menon 40751c6c9b scripts/spdxcheck.py: Strictly read license files in utf-8
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>
Link: https://lore.kernel.org/r/20210707204840.30891-1-nm@ti.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-07-12 09:56:50 -06:00
..
2021-07-10 11:01:38 -07:00
2020-12-08 23:30:04 +09:00
2021-07-10 11:01:38 -07:00
2021-04-26 08:38:10 -07:00
2021-07-10 11:01:38 -07:00
2020-10-22 13:13:57 -07:00
2021-07-10 11:01:38 -07:00
2021-02-26 09:41:05 -08:00
2021-05-02 00:43:35 +09:00
2021-05-08 10:00:11 -07:00
2020-12-08 23:30:04 +09:00
2020-12-08 23:30:04 +09:00
2021-07-09 04:01:14 +09:00
2021-05-02 00:43:35 +09:00
2021-05-03 17:23:06 -06:00