Pointer to invalid multibyte sequence in mbsnrtowcs()
Florian Weimer
fweimer@redhat.com
Fri Jan 27 13:42:00 GMT 2017
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
More information about the Libc-help
mailing list