From: Adam T. <aat...@ou...> - 2022-06-11 00:01:09
|
> However, in cases of user-supplied input, this is an API change. > We can fix the cases in the tests now but need due process for cases where > changes may lead to different behaviur for users. > Suggestion: > * backport Python 3.11 behaviour to docutils.io: > “use locale encoding when encoding="locale" is passed”. > * announce change of default encoding to UTF-8 > * keep encoding attribute unspecified for now when reading input > specified by users or 3rd-party code. This seems a sensible way forwards. The updated patch set does (1) and (2) and warns on unspecified encoding input in the ``docutils.io.(Input|Output)`` classes. > Consistent naming in Docutils code (not only latex2e.py) and > documentation is good. The updated patch set renames everything to my reccomendation below. (It is a larger change than originally envisaged, so it is 8 patches -- alternativley formatted on the web [1]_. > What is the motivation for 'utf-8'? The name of the encoding is UTF-8 [2]_ [3]_. I propose using UTF-8 (uppercase) in documentation and prose text and utf-8 (lowercase) in code (If you'd prefer consistency in case I would pick lowercase everywhere). A _[1]: https://github.com/AA-Turner/docutils/pull/15 and https://github.com/AA-Turner/docutils/pull/15.patch _[2]: https://www.ietf.org/rfc/rfc3629.html _[3]: https://encoding.spec.whatwg.org/#names-and-labels |