-
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
WG14 N2653: char8_t: A type for UTF-8 characters and strings #5
Comments
What about adding |
I'd like to consider that a separate issue from this one (which I'm going to close now since we adopted |
Actually, I'm not going to close this issue as it tracks updating both C and C++. We're halfway there... |
Minutes from the WG14 meeting in Brno, April 23-27th, 2018 in which the char8_t proposal for C (N2231) was discussed are available at: |
Sorry Tom that was 2018, not 2008 ... WG14 cogitations are long but not that long :) |
@DBJDBJ, thanks, comment fixed. |
So will char8_t be available in C, and do you know what macro would define it's existence (since it isn't in uchar.h like char16_t and char32_t)? obviously |
Hi @MarcusJohnson91. I'm working on completing an implementation of N2231 (char8_t for C) for gcc and glibc now. Once done, I'll submit a revision of N2231 to the C committee to consider adopting and will follow up with them.
Correct. I've been planning to use |
N2653 (char8_t: A type for UTF-8 characters and strings (Revision 1)) has now been submitted to WG14 as a revision of N2231. Reference implementations for gcc and libstdc++ are available here and for glibc here. Patches have been submitted to:
|
Hey @tahonermann Has char8_t been adopted by WG14? Reading draft N2731, and I'm not seeing it :( |
@MarcusJohnson91, no, not yet. I expect it to be discussed at the next WG14 meeting. |
Hey @tahonermann, my proposal for new length modifiers needs to be finished like ASAP and it sounds like we'll present at the same meeting. I'm creating the length modifiers U16 and U32 for char16_t and char32_t characters and strings. if you're planning on adding something like that for char8_t, I would use U8 to fit in, basically c/s/lc/ls are for locale specific conversions, and the U16/U32/U8? variants are for Unicode. Just a heads up. I can't wait for your paper to get in! |
Hi, @MarcusJohnson91, I have yet to review your proposal. I’m curious how it deals with encoding issues. It may be worth discussing it in an SG16 telecon as we would presumably want to align behavior with a hypothetical future As for your proposal supporting |
I've submitted a new revision of my proposal November 26th, but it hasn't been published yet. the original proposal is N2761; the main difference is I changed it from l16/l32 to U16/U32, and I clarified that precision and width specifiers operate on Codepoints, not Codeunits for security reasons. I believe Robert suggested I add support for char8_t, and in my draft I did specify U8 for char8_t types, but when I looked in the paper and saw that char8_t wasn't in yet, I dropped it from the draft. |
N2653 was accepted for C2x during the WG14 meeting held in late January and early February of 2022. An updated working paper has not yet been published but should be forthcoming. Closing. |
Proposals:
Reference implementation:
The text was updated successfully, but these errors were encountered: