public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3]: C++20 P0482R6 and C2X N2653: support for char8_t, mbrtoc8(), and c8rtomb().
@ 2022-02-27 16:53 Tom Honermann
  2022-03-23 15:32 ` Tom Honermann
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Honermann @ 2022-02-27 16:53 UTC (permalink / raw)
  To: libc-alpha

This series of patches provides the following:
- A fix for bug 25744 [1].
- Implementations of the mbrtoc8 and c8rtomb functions adopted for
   C++20 via WG21 P0482R6 [2] and for C2X via WG14 N2653 [3].
- A char8_t typedef as adopted for C2X via WG14 N2653 [3].

These patches addresses feedback provided in response to a previous 
submission [4].

Patch 1: A fix and test for bug 25744 [1].
Patch 2: Definitions of the mbrtoc8 and c8rtomb functions and the
          char8_t typedef.
Patch 3: Tests for the mbrtoc8 and c8rtomb functions and the char8_t
          typedef.

The fix for bug 25744 [1] is included in this patch series because the 
tests for mbrtoc8 and c8rtomb depend on it for exercising the special 
case where a pair of Unicode code points is converted to/from a single 
double byte sequence. Such conversion cases exist for Big5-HKSCS.

N2653 was adopted by WG14 for C2X during their recent meeting. This 
patch series enables the new declarations in C2X mode and when 
_GNU_SOURCE is defined.

Thank you to Joseph Myers and Carlos O'Donell for their prior reviews of 
this patch series.

Tom.

[1]: Bug 25744
      "mbrtowc with Big5-HKSCS returns 2 instead of 1 when consuming the
      second byte of certain double byte characters"
      https://sourceware.org/bugzilla/show_bug.cgi?id=25744

[2]: WG21 P0482R6
      "char8_t: A type for UTF-8 characters and strings (Revision 6)"
      https://wg21.link/p0482r6

[3]: WG14 N2653
      "char8_t: A type for UTF-8 characters and strings (Revision 1)"
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm

[4]: "[PATCH 2/3]: C++20 P0482R6 and C2X N2653: Implement mbrtoc8,
      c8rtomb, char8_t"
      https://sourceware.org/pipermail/libc-alpha/2022-February/136558.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/3]: C++20 P0482R6 and C2X N2653: support for char8_t, mbrtoc8(), and c8rtomb().
@ 2022-01-08  0:39 Tom Honermann
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Honermann @ 2022-01-08  0:39 UTC (permalink / raw)
  To: libc-alpha

This series of patches provides the following:
- A fix for bug 25744 [1].
- Implementations of the mbrtoc8 and c8rtomb functions adopted for
   C++20 via WG21 P0482R6 [2] and proposed for C2X in WG14 N2653 [3].
- A char8_t typedef as proposed for C2X in WG14 N2653 [3].

These patches addresses feedback provided in response to a previous 
submission [4][5].

Patch 1: A fix and test for bug 25744 [1].
Patch 2: Definitions of the mbrtoc8 and c8rtomb functions and the
          char8_t typedef.
Patch 3: Tests for the mbrtoc8 and c8rtomb functions and the char8_t
          typedef.

The fix for bug 25744 [1] is included in this patch series because the 
tests for mbrtoc8 and c8rtomb depend on it for exercising the special 
case where a pair of Unicode code points is converted to/from a single 
double byte sequence. Such conversion cases exist for Big5-HKSCS.

Since N2653 has not yet been adopted by WG14 for C2x, the new 
declarations are only present for C when _GNU_SOURCE is defined. If WG14 
adopts the proposal for C2x, additional changes will be needed to enable 
the changes for C2x.

Tom.

[1]: Bug 25744
      "mbrtowc with Big5-HKSCS returns 2 instead of 1 when consuming the
      second byte of certain double byte characters"
      https://sourceware.org/bugzilla/show_bug.cgi?id=25744

[2]: WG21 P0482R6
      "char8_t: A type for UTF-8 characters and strings (Revision 6)"
      https://wg21.link/p0482r6

[3]: WG14 N2653
      "char8_t: A type for UTF-8 characters and strings (Revision 1)"
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm

[4]: "[PATCH 2/3]: C++20 P0482R6 and C2X N2653: Implement mbrtoc8,
      c8rtomb, char8_t"
      https://sourceware.org/pipermail/libc-alpha/2021-June/127232.html

[5]: "[PATCH 3/3]: C++20 P0482R6 and C2X N2653: Tests for mbrtoc8,
      c8rtomb, char8_t"
      https://sourceware.org/pipermail/libc-alpha/2021-June/127233.html

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 0/3]: C++20 P0482R6 and C2X N2653: support for char8_t, mbrtoc8(), and c8rtomb().
@ 2021-06-07  2:07 Tom Honermann
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Honermann @ 2021-06-07  2:07 UTC (permalink / raw)
  To: libc-alpha

This series of patches provides the following:
- A fix for bug 25744 [1].
- Implementations of the mbrtoc8 and c8rtomb functions adopted for
   C++20 via WG21 P0482R6 [2] and proposed for C2X in WG14 N2653 [3].
- A char8_t typedef as proposed for C2X in WG14 N2653 [3].
- A _CHAR8_T_SOURCE feature test macro to be used to opt-in to support
   for the char8_t typedef and mbrtoc8/c8rtomb functions in pre-C++20
   or C source code.

Patch 1: A fix and test for bug 25744 [1].
Patch 2: Definitions of the mbrtoc8 and c8rtomb functions, the char8_t
          typedef, and the _CHAR8_T_SOURCE feature test macro.
Patch 3: Tests for the mbrtoc8 and c8rtomb functions and the char8_t
          typedef.

The fix for bug 25744 [1] is included in this patch series because the 
tests for mbrtoc8 and c8rtomb depend on it for exercising the special 
case where a pair of Unicode code points is converted to/from a single 
double byte sequence.  Such conversion cases exist for Big5-HKSCS.

Tom.

[1]: Bug 25744
      "mbrtowc with Big5-HKSCS returns 2 instead of 1 when consuming the
      second byte of certain double byte characters"
      https://sourceware.org/bugzilla/show_bug.cgi?id=25744

[2]: WG21 P0482R6
      "char8_t: A type for UTF-8 characters and strings (Revision 6)"
      https://wg21.link/p0482r6

[3]: WG14 N2653
      "char8_t: A type for UTF-8 characters and strings (Revision 1)"
      http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2653.htm

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-16 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-27 16:53 [PATCH 0/3]: C++20 P0482R6 and C2X N2653: support for char8_t, mbrtoc8(), and c8rtomb() Tom Honermann
2022-03-23 15:32 ` Tom Honermann
2022-05-16 16:04   ` Tom Honermann
  -- strict thread matches above, loose matches on Subject: below --
2022-01-08  0:39 Tom Honermann
2021-06-07  2:07 Tom Honermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).