[php-langspec][Issue #233] - Unicode codepoints are used in the specification, but the specification does not define encoding

[email protected] Thu, 21 Feb 2019 20:33:37 +0000
Newsgroups php.standards
Message-ID <[email protected]>
You can view the Issue on github:
https://github.com/php/php-langspec/issues/233

Comment by IMSoP:
OK, so the "encoding" of the parser is neither UTF-8 nor ASCII, since that string would be invalid in both. "7-bit ASCII, where 0x80 to 0xFF are allowed" is clearly a contradiction in terms, but "an ASCII-compatible encoding" as suggested by Nikita implies that *any* ASCII-compatible encoding is possible.

I think what is actually the case is that the parser treats the transformed source code as **a series of bytes**; bytes do not have an encoding, and a parser does not need to give them one. Within **the specification** (and, most likely, the source of an implementation), byte values are represented by their ASCII interpretations.

That makes your changes from U+0000 form to 0x00 form correct, because a conforming implementation could be written with no knowledge of ASCII by using those byte values.