[PATCH 3/3]: C++20 P0482R6 and C2X N2653: Tests for mbrtoc8, c8rtomb, char8_t

Tom Honermann tom@honermann.net
Mon Jun 7 02:08:08 GMT 2021


This patch adds tests for the mbrtoc8 and c8rtomb functions adopted for 
C++20 via WG21 P0482R6 [1] and proposed for C2X via WG14 N2653 [2], and 
for the char8_t typedef from WG14 N2653 [2].

The tests for mbrtoc8 and c8rtomb specifically exercise conversion 
from/to Big5-HKSCS because of special cases that arise with that 
encoding.  Big5-HKSCS defines some double byte sequences that convert to 
more than one Unicode code point.  In order to test this, the locale 
dependencies for running tests under wcsmbs is expanded to include 
zh_HK.BIG5-HKSCS.

Tested on Linux x86_64.

Tom.

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

[2]: 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: n2653-3.patch
Type: text/x-patch
Size: 43808 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20210606/3813c72a/attachment-0001.bin>


More information about the Libc-alpha mailing list