http://bugs.winehq.org/show_bug.cgi?id=31057
--- Comment #20 from Roman Kagan rkagan@mail.ru 2013-11-11 04:50:23 CST --- Looking at the source code, there appears to be a mismatch between MSVCRT_fgetwc() and MSVCRT_ungetwc(): the latter ignores all the smartness of the former, and just feeds all the bytes of its argument to MSVCRT_ungetc() one by one.
However, in case of a file without BOM, the file position after the first fgetwc() is rightfully 1; as a result, only one of the two MSVCRT_ungetc() succeeds.