Closed
Description
[EDIT: I opened this because I saw a redundancy in a paragraph in Reference / 2. Lexical analysis / 2.1 Line structure / 2.1.4 Encoding declarations. I neglected to explain the problem and instead jumped to what I now think is the wrong solution. See my explanation and better fix in https://github.com//issues/107607#issuecomment-1675967835. I leave the original post so the ensuing discussion makes sense.]
I believe "if the first bytes of the file are the UTF-8 byte-order mark (b'\xef\xbb\xbf'), the declared file encoding is UTF-8" in
Encoding declarations should end with "UTF-8-sig" or "UTF_8_sig". (Not sure which.)
Easy issue once fix verified.