[php-langspec][PR #234] - Define encoding of PHP scripts (Fix #233)

[email protected] Thu, 21 Feb 2019 19:42:45 +0000
Newsgroups php.standards
Message-ID <[email protected]>
You can view the Pull Request on github:
https://github.com/php/php-langspec/pull/234

Comment by Agares:
U+#### was ambiguous as there are multiple Unicode encodings (UTF-7, UTF-8, UTF-16, UTF-32, none of them encode the ranges specified as a single byte).
PHP itself doesn't care about the exact byte values, and doesn't care about unicode. The sequence of 4 bytes: 0xFF 0xFF 0xFF 0xFF isn't valid in any Unicode encoding as far as I know (it certainly isn't valid in UTF-8), but it's perfectly valid as a name in PHP.

And defining the encoding as ASCII + additional byte values is needed, so things like keywords have a defined encoding.