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

2023-09-29 Thread Jonathan Wakely
On Thu, 28 Sept 2023 at 20:39, Dimitrij Mijoski via Libstdc++ 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 other hand > surrogate

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

2023-09-28 Thread Dimitrij Mijoski
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.