lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190905170733.3a25dee8@coco.lan>
Date:   Thu, 5 Sep 2019 17:07:33 -0300
From:   Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
To:     Jonathan Corbet <corbet@....net>
Cc:     Linux Media Mailing List <linux-media@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...radead.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Joe Perches <joe@...ches.com>, linux-kernel@...r.kernel.org,
        Jessica Yu <jeyu@...nel.org>,
        Federico Vaga <federico.vaga@...a.pv.it>,
        Thomas Gleixner <tglx@...utronix.de>, linux-doc@...r.kernel.org
Subject: Re: [PATCH] docs: license-rules.txt: cover SPDX headers on Python
 scripts

Em Thu, 5 Sep 2019 13:40:08 -0600
Jonathan Corbet <corbet@....net> escreveu:

> On Thu, 5 Sep 2019 16:28:10 -0300
> Mauro Carvalho Chehab <mchehab+samsung@...nel.org> wrote:
> 
> > I don't think we can count that python 3 uses utf-8 per default.
> > 
> > I strongly suspect that, if one uses a Python3 version < 3.7, it will
> > still default to ASCII.
> > 
> > On a quick look, the new UTF-8 mode was added on PEP-540:
> > 
> > 	https://www.python.org/dev/peps/pep-0540/
> > 
> > Such change happened at Python 3.7.   
> 
> That PEP is to override the locale and use utf8 unconditionally.  It
> says, with regard to the pre-PEP state:
> 
> 	UTF-8 is also the default encoding of Python scripts, XML and JSON
> 	file formats.
> 
> Unicode was the reason for much of the Python 3 pain; it seems unlikely
> that many installations are defaulting to ASCII anyway...?

Yeah, but I remember that UTF-8 handling changed a few times during python 3
releases. I didn't really tracked what happened, as I don't usually program
in Python. So, I'm actually relying on what I can find about that.

Looking at Python 3.0 release[1], it says:

	"In many cases, but not all, the system default is UTF-8;
	 you should never count on this default."

[1] https://docs.python.org/3.0/whatsnew/3.0.html

So, at least on early Python 3 releases, the default may not be UTF-8.

I don't know about you, but, from time to time, people complain about
UTF-8 chars when I'm handling patches (last time was on a patch series
for Kernel 5.3 by a core dev in Australia, with was unable to apply a
patch from me with had some UTF-8 chars). 

So, I'm pretty sure that some devs don't set the locale to UTF8 even
those days.

Thanks,
Mauro

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ