getwchar_unlocked implementation.