slightly more cautious wchar_t encoding