Replaced codecvt with Win32 API.