file: fix wchar_t related bug