Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3086851pxv; Mon, 12 Jul 2021 09:00:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsKm7HcnZPTk2j2+QuZIy7Gw/0/q0uc1RRdnx6pk/8dqnF1qF7vi55ShxJer9fpO8gtmLZ X-Received: by 2002:a17:906:585:: with SMTP id 5mr52876348ejn.260.1626105639835; Mon, 12 Jul 2021 09:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626105639; cv=none; d=google.com; s=arc-20160816; b=vhRB/ohg/RjRF8GKCmuRdRkEoEPaosVZmyjCBYdKkfogBOb6PmfoUkasd6iUMt7+1Q 7izrfCBpkJBu9tsRwaNhOwJf+z6O2iQl4R2QDc5OuT4jlUiimQFSmfDoOILIt0Wmdz9s AQurqGQHiHJut46QwDXrbTzy5AAcTpZxGOcf5d1WSeHUHuphcLxj/8g5BmynzpMkSPNa b45RJKwRcOwnF+/S4SumhG8N7MmrQPuSBIzK40Z0tAesUwpZQnshlgRAE6Ohnrsc9J0H 04QCCNtiCzJ0GtkrKHLrwCkXnpVngJ+Je/qOZaTIUJOdVRvfN1+6MvlFx+1LUvlFDp5c Mm7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature:dkim-filter; bh=Qb3OXo7qhoaP3C4INVLiWv6MZA+pYBII5/GUopy3zWs=; b=eCskmtTlGU75b4n0QeN1JqEQUJujPJ+T380MUiPPXyq2cycRqx/4tdyBRGkGaG5DaM wVya2b+S8bF0eqbCqqBauGILyzwefCC2z2A5O+J6dv2AJVZeG02pKbOSrzZByLWQrk3G d1a8hAWc/n7gGQtkgtnCKAZps2rA114rwJyRPBhgac9nTf2AVTAYGcuYlOEE122VGy8+ Fme2ZHWSG1H8F5oSaj6GiCUnevvZkcf0vJ3TbxjK2tn8eedBRLdqqVhBesXtSBZaskwl 2l6tqhR61zgtQN7avN+AetAaatGLODu3oBu3LNdhyB6DoOWFfZZKzU/3pL6yGnd7Bqov h/pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=Aae8KS5Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si17055956ejd.8.2021.07.12.09.00.16; Mon, 12 Jul 2021 09:00:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=Aae8KS5Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233957AbhGLQBp (ORCPT + 99 others); Mon, 12 Jul 2021 12:01:45 -0400 Received: from ms.lwn.net ([45.79.88.28]:42284 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbhGLQBp (ORCPT ); Mon, 12 Jul 2021 12:01:45 -0400 Received: from localhost (unknown [IPv6:2601:281:8300:104d::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 10B0736E; Mon, 12 Jul 2021 15:58:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 10B0736E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1626105536; bh=Qb3OXo7qhoaP3C4INVLiWv6MZA+pYBII5/GUopy3zWs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Aae8KS5Z6cOukMDwLjn9CLgDbWIL2ZDm2u898yF8m+4X/Zj9AT3uOZ1aWUmQYk7vF LqJ9yD4YN3DIOaVpzWoiRhahezYUlmkGyH1rYeI+nk6Cm6Ec4ybFN2hqyH1IQ1wKCn Sv57PGROrEU/LjRiUO7APcayTASSPIULykk1lqv/WSvXUbZCG/6yF58XylEnbXqD0V u0foO8nM+J2/plsjJ80i6W94l2VUm2SKTqLEMVdyhC+gp+WiM/9LCuRH144pWaR04Q BViKBkvSsLId6otZGTIepkG3AZ6YfXYubuBM15YibFAY9hkfzQlnj+5Mpj/lB+QK/S DujrTKjPfSQcQ== From: Jonathan Corbet To: Nishanth Menon , Greg Kroah-Hartman , Thomas Gleixner Cc: "Ravikumar, Rahul" , lkml , linux-spdx , Nishanth Menon Subject: Re: [PATCH V2] scripts/spdxcheck.py: Strictly read license files in utf-8 In-Reply-To: <20210707204840.30891-1-nm@ti.com> References: <20210707204840.30891-1-nm@ti.com> Date: Mon, 12 Jul 2021 09:58:55 -0600 Message-ID: <87y2abr0ao.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nishanth Menon 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 > 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 > Signed-off-by: Nishanth Menon > Reviewed-by: Thomas Gleixner I've applied this, thanks. jon