sg16-unicode / sg16

SG16 overview and general information
45 stars 5 forks source link

WG14: Make char16_t/char32_t string literals be UTF-16/32 #54

Closed tahonermann closed 2 years ago

tahonermann commented 4 years ago

P1041 was adopted for C++20. We should now move forward getting it adopted for C.

ThePhD commented 3 years ago

Draft for the next mailing. Feedback welcome.

https://thephd.github.io/_vendor/future_cxx/papers/C%20-%20char16_t%20&%20char32_t%20string%20literals%20shall%20be%20UTF-16%20&%20UTF-32.html

tahonermann commented 3 years ago

I briefly reviewed; looks good.

There is what looks to be two copy/paste wording issues in 3.4 (§6.4.4.4) https://thephd.github.io/_vendor/future_cxx/papers/C%20-%20char16_t%20&%20char32_t%20string%20literals%20shall%20be%20UTF-16%20&%20UTF-32.html#rewrite-6.4.4.4-character-constants-paragraph-12-and-13-and-insert-2-new-paragraphs-before-13-making-it-15:

  1. In the wording for UTF-8 character constants, it states, "A UTF–8 character constant has type unsigned char which is an unsigned integer types defined in the header."  The type is right, but uchar.h is not involved.
  2. In the wording for the UTF-16 and UTF-32 character constants, it states, "A UTF–16 (UTF-32) character constant has type unsigned char which is an unsigned integer types defined in the header.  This time the type is incorrect (it should be char16_t (char32_t), but the reference to uchar.h is right.

Tom.

On 3/27/21 10:40 AM, The Phantom Derpstorm wrote:

Draft for the next mailing. Feedback welcome.

https://thephd.github.io/_vendor/future_cxx/papers/C%20-%20char16_t%20&%20char32_t%20string%20literals%20shall%20be%20UTF-16%20&%20UTF-32.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sg16-unicode/sg16/issues/54#issuecomment-808743207, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ37XA3YYHNAOOB3VM6LVDTFXU45ANCNFSM4KV46NDQ.

ThePhD commented 3 years ago

Thanks for the corrections, Tom, I definitely did too much copy-pasta: https://thephd.github.io/_vendor/future_cxx/papers/C%20-%20char16_t%20&%20char32_t%20string%20literals%20shall%20be%20UTF-16%20&%20UTF-32.html

WPMGPRoSToTeMa commented 3 years ago

In 3.8: The encoding of any of wchar_t I think it can be replaced with: The encoding of wchar_t

tahonermann commented 2 years ago

This issue was resolved by the adoption of N2728 (char16_t & char32_t string literals shall be UTF-16 & UTF-32 | r0) for C23 during the August/September 2021 WG14 meeting as noted in N2913 (Editor's Report, Post May 2022 Meeting). Closing.