fgetwc may clobber errno when the result is not WEOF