This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pointer to invalid multibyte sequence in mbsnrtowcs()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]