- if( !MultiByteToWideChar( CP_UTF8, 0, filename, -1, wpath, MAX_PATH ) )
- {
- errno = ENOENT;
- return -1;
- }
- wpath[MAX_PATH] = L'\0';
-
- /*
- * unlink() cannot open files with non-“ANSI” characters on Windows.
- * We use _wunlink() instead.
- */
- return _wunlink( wpath );
+ if( !MultiByteToWideChar( CP_UTF8, 0, filename, -1, wpath, MAX_PATH ) )
+ {
+ errno = ENOENT;
+ return -1;