Re: wctomb() accepts out-of-range character in C-locale
"Jun. T" <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
> 2024/03/25 20:26, Bruno Haible <[email protected]> wrote: > >>> But a wide character >= 0x80 can't be converted into a valid >>> character in C-loccale (7bit), I think. > > Err. "C" locale, a.k.a. "POSIX" locale, is not 7-bit but 8-bit. > Quoting https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap06.html#tag_06_02 : > "The POSIX locale shall contain 256 single-byte characters ..." I still can't understand why it is useful to convert wide char in the range 0x80-0xff to an 8bit char in C-locale (for example convert wide char 0xe1 (U+00e1) = á to an 8bit char 0xe1). But if you say this is THE correct behavior then it's OK.