And on a lower level, `fgetwc()` gets crashed deliberately in `libc` when applied to a stream created with `fopencookie()`. It should be incredible, but Linux `libc` is not Unicode-capable in 2023.
There's glibc, musl libc, etc. Also consider you may be using the functions incorrectly.
https://elixir.bootlin.com/glibc/glibc-2.38/source/libio/gen...