New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[doc] Encoding declaration: doc supported encodings #68751
Comments
The source .rst for While I believe this is impractical, there could be a link to |
I have added link to Standard Encodings : https://docs.python.org/3/library/codecs.html#standard-encodings |
You can remove the “.. XXX” line; I understand it is just like a TODO comment, and with this fixed it would no longer be relevant. I suggest putting the links next to the sentence that ends “. . . the encoding name must be recognized by Python.” The links should be internal links, rather than hard-coded Internet links to another version of the documentation. See <https://docs.python.org/devguide/documenting.html#cross-linking-markup\>. The Standard Encodings section already has a label already set up for you to use :) |
PEP-263 doesn’t say exactly what encodings are supported. It mentions Shift JIS is supported, but UTF-16 is not. Only UTF-8 is allowed if the file starts with a UTF-8 BOM. I guess many of the Python-specific text encodings from the second section may be supported. Probably any text encoding in general, as long as the first one or two lines can “rougly” be parsed in ASCII. |
I am writing a PR with an internal link. I decided that linking to Standard Encodings is sufficient. The Python Text Encodings section follows that. Anyone wanting to use any of those can experiment to see which work. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: