-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
disallow '\xff' character syntax #24558
Comments
StefanKarpinski
added
domain:strings
"Strings!"
status:triage
This should be discussed on a triage call
and removed
status:triage
This should be discussed on a triage call
labels
Nov 9, 2017
JeffBezanson
added a commit
that referenced
this issue
Nov 20, 2017
JeffBezanson
added a commit
that referenced
this issue
Nov 20, 2017
JeffBezanson
added a commit
that referenced
this issue
Nov 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In light of #24439
'\xff'
may become a syntax for aChar
that contains invalid UTF-8 data rather than being another way of writing'\uff'
– i.e. the code point 255 (ÿ
). This is already illegal in string literals where\u
or\U
is required for code points above 127, so we would just be bringing character syntax in sync with string syntax. Note that we once upon a time allowed"\xff"
as a string literal with invalid UTF-8 in it, which is why it's not allowed in strings. It is, however, allowed in byte string, i.e.b"\xff"
produces[0xff]
. We could allow\xff
in strings, however, and all need forb"\xff"
would go away since you can just use normal strings instead of the byte form. That would bring strings and characters fully in sync.The text was updated successfully, but these errors were encountered: