This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Pointer to invalid multibyte sequence in mbsnrtowcs()
- From: Igor Liferenko <igor dot liferenko at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-help <libc-help at sourceware dot org>
- Date: Mon, 30 Jan 2017 09:51:55 +0700
- Subject: Re: Pointer to invalid multibyte sequence in mbsnrtowcs()
- Authentication-results: sourceware.org; auth=none
- References: <CAJyx361JOYOb_DpVWRjYTQ+DSkCT2SxMcV-BF-M5e0-BQd8Gvg@mail.gmail.com> <aefa0243-d968-f8f9-c67b-d142f4096b05@redhat.com> <CAJyx361UhMbsFAyw3Umg4nQ=AKt8-bJjB+cKouCSXcs6uTVkSQ@mail.gmail.com> <6960e8c6-6896-edac-2656-a26be5cb09f3@redhat.com>
Bug report is posted here: https://sourceware.org/bugzilla/show_bug.cgi?id=20860
On 27/01/2017, Florian Weimer <fweimer@redhat.com> wrote:
> On 12/20/2016 02:17 AM, Igor Liferenko wrote:
>> Hi Florian,
>>
>>>> setlocale(LC_CTYPE, "en_US.UTF-8");
>>>> char *s = "\321\216\321";
>>>
>>> I'm not sure if this example demonstrates the behavior you describe
>>> because the string starts with an invalid multibyte sequence
>>
>> \321\216 is a valid UTF-8 code of U+044E (CYRILLIC SMALL LETTER YU)
>> Besides, "status: 1" in the output of the example means that one wide
>> character was successfully converted.
>>
>> Do you know why in Example 2 *src is unchanged?
>
> Can you report this as a bug so that it does not get lost? It does look
> like we need to fix this.
>
> Thanks,
> Florian
>
>