Re: [PATCH] libstdc++: Fix handling of surrogate CP in codecvt [PR108976]

2023-03-20 Thread Dimitrij Mijoski via Gcc-patches
On Mon, 2023-03-20 at 15:21 +, Jonathan Wakely wrote: > > Thanks, the patch looks OK to my uninformed eye, but I'm seeing a new > regression: > > /home/jwakely/src/gcc/gcc/libstdc++- > v3/testsuite/22_locale/codecvt/codecvt_utf16/79980.cc:86: void > test06(): Assertion 'result == u"from_bytes

Re: [PATCH] libstdc++: Fix handling of surrogate CP in codecvt [PR108976]

2023-03-20 Thread Jonathan Wakely via Gcc-patches
On Wed, 8 Mar 2023 at 14:09, Dimitrij Mijoski via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This patch fixes the handling of surrogate code points in all standard > facets for transcoding Unicode that are based on std::codecvt. Surrogate > code points should always be treated as error. On the ot

[PATCH] libstdc++: Fix handling of surrogate CP in codecvt [PR108976]

2023-03-08 Thread Dimitrij Mijoski via Gcc-patches
This patch fixes the handling of surrogate code points in all standard facets for transcoding Unicode that are based on std::codecvt. Surrogate code points should always be treated as error. On the other hand surrogate code units can only appear in UTF-16 and only when they come in a proper pair.