-
Notifications
You must be signed in to change notification settings - Fork 5
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 that char16_t and char32_t literals are UTF-16 and UTF-32 respectively #6
Comments
Status of this issue: P1041R1 appeared in the post-Rapperswil mailing. With a little luck, it will be presented to EWG in San Diego. |
Luck achieved: this was presented in San Diego with a presentation from @tahonermann. It is on track for C++20. We will need to bring it through EWG, but no resistance to this is anticipated. |
Side note: it was decided that for the |
@martinho, we should get an updated revision of this paper in the pre-Kona mailing (after November 26th, but before January 21st). Some things to update:
With regard to those macros, we actually had references to them in C++14 (in the For reference: gcc and clang both define |
This issue was resolved by the adoption of P1041R4 in Kona. Closing. |
The C and C++ standards do not currently specify that the encoding of
char16_t
andchar32_t
literals are respectively UTF-16 and UTF-32. C states that they are only if the correspondingSTDC_UTF_16
orSTDC_UTF_32
macro is defined to 1 (6.10.8.2, "Environment macros"). Various parts of the C++ standard (codecvt
andchar_traits
) refer to UTF-16/UTF-32 thereby admitting a bias towards these encodings despite lack of strict specification.It may be that, in practice, all C and C++ compilers that are being updated to conform to new standards, are only using UTF-16 and UTF-32 for these literals. If so, the standards can be updated to mandate the use of these encodings.
The text was updated successfully, but these errors were encountered: