Summary: | mbrtowc(&x, "\xfa\xbd\x83\x96\x80", 5, NULL) return 5, instead of -1 with UTF-8 locale | ||
---|---|---|---|
Product: | glibc | Reporter: | Johannes Berg <johannes> |
Component: | locale | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | fweimer |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | simple test program |
Description
Johannes Berg
2020-05-24 19:33:31 UTC
Hm, yeah, that sounds the same, I had only searched for the specific function(s), not the broader issue. I guess I won't hold my breath for this to get fixed then ... Hm, note though. I was just mentioning this to somebody, and 2373 talks about *encoding* while this is mostly about *decoding*. So it's related, but not exactly the same. Up to you whether or not you want to treat it as a duplicate, but it's two sides of the same coin. An argument could be made, for example, for allowing *encoding* it (since why did the application store something >0x10ffff in a wchar_t to start with, that was already invalid) but not *decoding* it, even if that breaks the round-trip property. |