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

disallow '\xff' character syntax #24558

Closed
StefanKarpinski opened this issue Nov 9, 2017 · 0 comments
Closed

disallow '\xff' character syntax #24558

StefanKarpinski opened this issue Nov 9, 2017 · 0 comments
Assignees
Labels
domain:strings "Strings!" parser Language parsing and surface syntax
Milestone

Comments

@StefanKarpinski
Copy link
Sponsor Member

In light of #24439 '\xff' may become a syntax for a Char 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 for b"\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.

@StefanKarpinski 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
@StefanKarpinski StefanKarpinski added this to the 1.0 milestone Nov 16, 2017
@JeffBezanson JeffBezanson self-assigned this Nov 20, 2017
@JeffBezanson JeffBezanson added the parser Language parsing and surface syntax label Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:strings "Strings!" parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

2 participants