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

XID_Start / XID_Continue might not be quite right #4928

Closed
graydon opened this issue Feb 14, 2013 · 11 comments
Closed

XID_Start / XID_Continue might not be quite right #4928

graydon opened this issue Feb 14, 2013 · 11 comments
Labels
A-grammar Area: The grammar of Rust C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@graydon
Copy link
Contributor

graydon commented Feb 14, 2013

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1518.htm

The ISO JTC1/SC22/WG14 (C language) think that possibly UTR#31 didn't quite hit the nail on the head in terms of defining identifier syntax. They have a couple tweaks in mind. Consider following their lead.

@catamorphism
Copy link
Contributor

Bug triage. Re-nominating to change to milestone 1, well-defined.

@graydon
Copy link
Contributor Author

graydon commented Aug 22, 2013

accepted for backwards-compatible milestone

@emberian
Copy link
Member

emberian commented Apr 7, 2014

Non-ascii identifiers are currently feature gated, so this isn't as pressing, but we still need to figure out what to do here. Re-nominating, I don't think this needs to be backcompat.

@pnkfelix
Copy link
Member

Correct, non-ascii idents are feature-gated. Recategorizing as P-low (and not 1.0).

@yongqli
Copy link

yongqli commented Jun 23, 2015

I would really like to see Unicode superscripts allowed, as subscripts already are. I would be willing to make a pull request to implement this.

@steveklabnik
Copy link
Member

Triage: unicode identifiers are still feature gated, no changes.

@pnkfelix pnkfelix added the T-lang Relevant to the language team, which will review and decide on the PR/issue. label Nov 18, 2016
@Mark-Simulacrum Mark-Simulacrum added C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed A-frontend Area: frontend (errors, parsing and HIR) labels Jul 19, 2017
@rurban
Copy link

rurban commented Nov 9, 2017

XID_Start / XID_Continue has one small bug, and is not enough to get proper unicode identifiers safe. See also http://websec.github.io/unicode-security-guide/
You need to add mixed script protections (TR39 Restriction levels), normalize them (to NFC or NFKC_Casefold), and maybe disallow confusables.
A short overview is here: http://perl11.org/blog/unicode-identifiers.html

bug: U+3164 HANGUL FILLER and U+ffa0 are wrongly specified as ID_Continue. Disallow these.

@Centril
Copy link
Contributor

Centril commented Oct 29, 2018

Closing in favor of #55467.

@Centril Centril closed this as completed Oct 29, 2018
@SimonSapin
Copy link
Contributor

@Centril, is this specific issue actually addressed in rust-lang/rfcs#2457 or tracked in #55467? As far as I can tell they specify unmodified XID_Start and XID_Continue.

@Centril
Copy link
Contributor

Centril commented Oct 29, 2018

@SimonSapin at least tracked in that issue to consolidate; tho I didn't read the issue description in detail.

@SimonSapin
Copy link
Contributor

I’ve added this as a checkbox in Unresolved Questions in #55467

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust C-enhancement Category: An issue proposing an enhancement or a PR with one. P-low Low priority T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests