Skip to content
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

Closed
terryjreedy opened this issue Jul 3, 2015 · 8 comments
Closed

[doc] Encoding declaration: doc supported encodings #68751

terryjreedy opened this issue Jul 3, 2015 · 8 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 24563
Nosy @terryjreedy, @vadmium, @miss-islington
PRs
  • bpo-24563: Link encoding names to encoding declarations #32274
  • [3.10] bpo-24563: Link encoding names to encoding declarations (GH-32274) #32275
  • [3.9] bpo-24563: Link encoding names to encoding declarations (GH-32274) #32276
  • Files
  • encoding_links.patch: Added links to Standard Encodings and Python Specific Encodings
  • 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:

    assignee = None
    closed_at = <Date 2022-04-03.00:41:31.453>
    created_at = <Date 2015-07-03.23:38:39.310>
    labels = ['easy', '3.9', '3.10', '3.11', 'type-feature', 'docs']
    title = '[doc] Encoding declaration: doc supported encodings'
    updated_at = <Date 2022-04-03.00:41:31.453>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2022-04-03.00:41:31.453>
    actor = 'terry.reedy'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2022-04-03.00:41:31.453>
    closer = 'terry.reedy'
    components = ['Documentation']
    creation = <Date 2015-07-03.23:38:39.310>
    creator = 'terry.reedy'
    dependencies = []
    files = ['39884']
    hgrepos = []
    issue_num = 24563
    keywords = ['patch', 'easy']
    message_count = 8.0
    messages = ['246233', '246459', '246880', '246884', '416604', '416605', '416606', '416607']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'docs@python', 'martin.panter', 'ksameersrk', 'miss-islington']
    pr_nums = ['32274', '32275', '32276']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue24563'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @terryjreedy
    Copy link
    Member Author

    The source .rst for
    <https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations\>
    has at the end:
    .. XXX there should be a list of supported encodings.

    While I believe this is impractical, there could be a link to
    https://docs.python.org/3/library/codecs.html#standard-encodings
    -- and possible subsubsections that follow. Are the latter supported for Python code?

    @terryjreedy terryjreedy added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Jul 3, 2015
    @ksameersrk
    Copy link
    Mannequin

    ksameersrk mannequin commented Jul 8, 2015

    I have added link to Standard Encodings : https://docs.python.org/3/library/codecs.html#standard-encodings
    and Python Specific Encodings : https://docs.python.org/3/library/codecs.html#python-specific-encodings

    @vadmium
    Copy link
    Member

    vadmium commented Jul 18, 2015

    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 :)

    @vadmium
    Copy link
    Member

    vadmium commented Jul 18, 2015

    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.

    @iritkatriel iritkatriel added easy 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels Apr 2, 2022
    @iritkatriel iritkatriel changed the title Encoding declaration: doc supported encodings [doc] Encoding declaration: doc supported encodings Apr 2, 2022
    @terryjreedy
    Copy link
    Member Author

    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.

    @terryjreedy
    Copy link
    Member Author

    New changeset 01be5d6 by Terry Jan Reedy in branch 'main':
    bpo-24563: Link encoding names to encoding declarations (GH-32274)
    01be5d6

    @miss-islington
    Copy link
    Contributor

    New changeset f4e280d by Miss Islington (bot) in branch '3.9':
    bpo-24563: Link encoding names to encoding declarations (GH-32274)
    f4e280d

    @miss-islington
    Copy link
    Contributor

    New changeset ce6af31 by Miss Islington (bot) in branch '3.10':
    bpo-24563: Link encoding names to encoding declarations (GH-32274)
    ce6af31

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants