https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202240
The function fwscanf() return value is wrong incase of invalid input character.
For example:
int ret = fwscanf(fptr, L"j%s", buf);
The above call should return ZERO for matching failure, however it currently returns EOF.
The fscanf() function behaves correctly. Comparing the source of both functions confirms the return is value is wrong for fwscanf().