2 ms·
> I don't feel it's obvious at all. Is it not surprising that you can't reliably store chars to a file using fgetc/fputc? Chars 2 to 4 times larger than what t
by masklinn 4y ago
> I don't feel it's obvious at all. Is it not surprising that you can't reliably store chars to a file using fgetc/fputc?
Chars 2 to 4 times larger than what the standard requires? Not really. It means one platform would be reading / writing 4 bytes (octets) at a time, at which point endianness rears its ugly head.
That sounds a lot worse than clamping values to a byte.