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

Specify what constitutes a new-line #70

Open
tahonermann opened this issue Mar 23, 2021 · 4 comments
Open

Specify what constitutes a new-line #70

tahonermann opened this issue Mar 23, 2021 · 4 comments
Labels
clarification Something isn't clear help wanted Extra attention is needed paper needed A paper proposing a specific solution is needed

Comments

@tahonermann
Copy link
Member

The C++ standard defines behavior that depends on the presence of a new-line, but does not define what characters or character sequences constitute a new-line. Uses of the "newline" and "new-line" terms appear in:

P2178 proposal 2 sought to clarify the set of characters and character sequences that constitute new-lines and proposed the following set. This set was derived from information in UAX #14.

  • U+000A: LINE FEED (LF)
  • U+000B: LINE TABULATION
  • U+000C: FORM FEED (FF)
  • U+000D: CARRIAGE RETURN (CR)
  • U+000D: CARRIAGE RETURN (CR) then U+000A: LINE FEED (LF)
  • U+0085: NEXT LINE (NEL)
  • U+2028: LINE SEPARATOR
  • U+2029: PARAGRAPH SEPARATOR

This set matches the guidance in Unicode 13, chapter 5.8, "Newline Guidelines".

When addressing this issue, we should settle on one of either "newline" or "new-line". The Unicode standard uses "newline". ISO 10646 only mentions newline in character names.

@tahonermann
Copy link
Member Author

P2295 addresses this. The wording in revision 0 proposes the same set of characters as in P2178.

@tahonermann tahonermann added clarification Something isn't clear paper submitted A paper proposing a specific solution has been submitted labels Mar 23, 2021
@tahonermann
Copy link
Member Author

The following CWG issues are relevant with regard to the form of a newline:

@tahonermann
Copy link
Member Author

Later revisions of P2295 no longer address this.

@tahonermann tahonermann added help wanted Extra attention is needed paper needed A paper proposing a specific solution is needed and removed paper submitted A paper proposing a specific solution has been submitted labels Mar 28, 2021
@cor3ntin
Copy link
Collaborator

P2348 - of which an early draft is there https://isocpp.org/files/papers/D2348R0.pdf rewords the handling of whitspaces and new lines without extending the set

The following CWG issues are relevant with regard to the form of a newline:

I hope we can address all of these in P2348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Something isn't clear help wanted Extra attention is needed paper needed A paper proposing a specific solution is needed
Development

No branches or pull requests

2 participants