add wchar_t support