Pointer to invalid multibyte sequence in mbsnrtowcs()
Igor Liferenko
igor.liferenko@gmail.com
Tue Dec 20 01:17:00 GMT 2016
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?
Thanks,
Igor
More information about the Libc-help
mailing list