make fgetwc handling of encoding errors consistent with/without buffer