chardev: Windows stdio eats characters