[PATCH 3/6] Make fflush (NULL) flush input files (bug 32369)
DJ Delorie
dj@redhat.com
Wed Jan 15 20:06:20 GMT 2025
Joseph Myers <josmyers@redhat.com> writes:
> That's simply how all the wide I/O functions work.
I'm not doubting the test's correctness or now the functions run, I'm
just saying I was surprised that it did a wide->multi conversion. And
IMHO when someone reading code is surprised, that's a good spot for a
comment ;-)
> This test is using the C locale; since it's only using ASCII characters,
> no specific locale is needed. A null character can't be part of another
> multibyte character, which means that UTF-16 and UTF-32 are not possible
> locale multibyte encodings to write out to the file.
Do we have an API that can write UTF-16 or UTF-32 encodings to files?
Or do they devolve to using the regular fwrite et al?
More information about the Libc-alpha
mailing list