From: Adam T. <aat...@ou...> - 2022-06-09 22:55:12
|
> This means for every instance of open() without explicit encoding, we have > to decide whether to use "ascii", "utf-8", or `io.locale_encoding` > (the latter is equivalent to the value "locale" introduced in Py 3.10). My strong suggestion would be that Docutils moves towards defaulting to UTF-8 for all encodings (of course keeping the option to supply explicit other encodings) -- it is compatible with US-ASCII and is the safest sane default. (PEP 686's motivation section [1]_ has some colour on this). >Unfortunately, the patch mixes added "encoding" arguments with the>change of "utf8" to "utf-8" in many cases. An updated patch attached (The only 'utf8' -> 'utf-8' were in the LaTex2e writer, but you're right it is better to keep the changes distinct.) A _[1]: https://peps.python.org/pep-0686/#motivation |