On 11.01.2018 01:22, Nick Coghlan wrote: > On 11 January 2018 at 05:04, M.-A. Lemburg <m...@egenix.com> wrote: >> For the stdlib, I think we should stick to standards and >> not go for spreading non-standard ones. >> >> So -1 on adding WHATWG encodings to the stdlib. > > We already support HTML5 in the standard library, and saying "We'll > accept WHATWG's definition of HTML, but not their associated text > encodings" seems like a strange place to draw a line when it comes to > standards support.
There's a problem with these encodings: they are mostly meant for decoding (broken) data, but as soon as we have them in the stdlib, people will also start using them for encoding data, producing more corrupted data. Do you really things it's a good idea to support this natively in Python ? The other problem is that WHATWG considers its documents "living standards", i.e. they are subject to change and don't come with a version number (apart from a date). This makes sense when you look at their mostly decoding-only nature, but, again for encoding, creates an interoperability problem. > I do think your observation constitutes a compelling reason to leave > the existing codecs alone though, and treat the web codecs as a > distinct set of mappings. Given that, I think Rob's original > suggestion of using "web-1252" et al is a good one. > > We can also separate them out in the documentation, such that we have > three tables: > > * https://docs.python.org/3/library/codecs.html#standard-encodings > (Unicode Consortium) > * https://docs.python.org/3/library/codecs.html#python-specific-encodings > (python-dev/PSF) > * a new table for WHATWG encodings > > Cheers, > Nick. > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Jan 11 2018) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/