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

Raw strings don't preserve carriage return + newline sequences #82721

Closed
Count-Count opened this issue Mar 3, 2021 · 2 comments
Closed

Raw strings don't preserve carriage return + newline sequences #82721

Count-Count opened this issue Mar 3, 2021 · 2 comments

Comments

@Count-Count
Copy link
Contributor

Count-Count commented Mar 3, 2021

According to the Raw string literals section in the reference the "raw string body can contain any sequence of Unicode characters" and "[a]ll Unicode characters contained in the raw string body represent themselves". However in such a raw string carriage return + newline sequences (U+000D U+000A) are replaced by a single newline char (U+000A).

This is probably a sensible choice but if so should be documented thus.

Testcase

@Count-Count Count-Count changed the title Raw strings don't preserve cr+nl sequences Raw strings don't preserve carriage return + new line sequences Mar 3, 2021
@Count-Count Count-Count changed the title Raw strings don't preserve carriage return + new line sequences Raw strings don't preserve carriage return + newline sequences Mar 3, 2021
@ehuss
Copy link
Contributor

ehuss commented Mar 3, 2021

Thanks for the report! Issues for the reference go in the https://github.com/rust-lang/reference repository, and this is a known issue where the reference needs to be updated, see rust-lang/reference#626.

@Count-Count
Copy link
Contributor Author

@ehuss Thanks for the comment! I am closing this as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants