public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Dimitrij Mijoski <dmjpp@hotmail.com>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH v2] libstdc++: Fix Unicode codecvt and add tests [PR86419]
Date: Fri, 13 Jan 2023 01:08:20 +0000	[thread overview]
Message-ID: <CACb0b4m+BJ1U5Mh74Xr543fwnDG0XQ5Y+ndXLjiGTJL=ep6KOg@mail.gmail.com> (raw)
In-Reply-To: <AM0PR04MB541256BD6B9838E4BE055B85ACFF9@AM0PR04MB5412.eurprd04.prod.outlook.com>

On Tue, 10 Jan 2023 at 12:59, Dimitrij Mijoski via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> Fixes the conversion from UTF-8 to UTF-16 to properly return partial
> instead ok.
> Fixes the conversion from UTF-16 to UTF-8 to properly return partial
> instead ok.
> Fixes the conversion from UTF-8 to UCS-2 to properly return partial
> instead error.
> Fixes the conversion from UTF-8 to UCS-2 to treat 4-byte UTF-8 sequences
> as error just by seeing the leading byte.
> Fixes UTF-8 decoding for all codecvts so they detect error at the end of
> the input range when the last code point is also incomplete.
>
> libstdc++-v3/ChangeLog:
>         PR libstdc++/86419
>         * src/c++11/codecvt.cc: Fix bugs.
>         * testsuite/22_locale/codecvt/codecvt_unicode.cc: New tests.
>         * testsuite/22_locale/codecvt/codecvt_unicode.h: New tests.
>         * testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc: New
>           tests.

I'm just finishing testing and will push this. I had to add <memory>
to the new codecvt_unicode.h header, and fixed some formatting in
codecvt (we don't put a space before function parameter lists in the
libstdc++ code, unlike in the code for the GCC compiler itself). I've
also made the changelog entry a bit more descriptive.

Thanks again for the bug report and for fixing it!


      parent reply	other threads:[~2023-01-13  1:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 12:58 Dimitrij Mijoski
2023-01-10 13:28 ` Jonathan Wakely
2023-01-10 13:43   ` Dimitrij Mijoski
2023-01-10 14:03     ` Jonathan Wakely
2023-01-13  1:08 ` Jonathan Wakely [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACb0b4m+BJ1U5Mh74Xr543fwnDG0XQ5Y+ndXLjiGTJL=ep6KOg@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=dmjpp@hotmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).