u8-istream: Fix reading UTF-16 and UTF-32 files.