-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
The heart example in docs for std::char primitive is ambiguous #36998
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-medium
Medium priority
Comments
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Aug 17, 2017
Opened primarily to address rust-lang#36998.
This will be fixed by #43919. |
aidanhs
added a commit
to aidanhs/rust
that referenced
this issue
Aug 18, 2017
…=QuietMisdreavus Minor rewrite of char primitive unicode intro. Opened primarily to address rust-lang#36998. Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two. Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅
bors
added a commit
that referenced
this issue
Aug 19, 2017
…eavus Minor rewrite of char primitive unicode intro. Opened primarily to address #36998. Despite my love for emoji, the heart example is a little confusing because both heart characters start with the same code point and there can be stark rendering differences across browsers. I also spelled out what each of the code points is in the code block, which (hopefully) sheds light why one character is one code point while the other is two. Very much open to suggestion and improvements. I'm pretty tired when I wrote this so I might wake up and realize that this is making things more confusing 😅
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
P-medium
Medium priority
I was going through the docs for std::char and found out that the heart is at first encoded with two codepoints (❤️) and just one afterwards (❤). This is misleading, as the difference is not visible in the browser (at least not in Chrome) and the reader first sees information that:
and afterwards there are perfectly valid examples like
What makes matters worse is that they both start with the same code point; the second example I listed states that:
While in the first case there is:
I found this misleading and had to use a hex editor to discover the difference.
The text was updated successfully, but these errors were encountered: