-#elif defined (USE_MB2MB)
- char *out;
- int len;
-
- len = 1 + MultiByteToWideChar (from ? CP_ACP : CP_UTF8,
- 0, string, -1, NULL, 0);
- wchar_t *wide = malloc (len * sizeof (wchar_t));
- if (wide == NULL)
- return NULL;
-
- MultiByteToWideChar (from ? CP_ACP : CP_UTF8, 0, string, -1, wide, len);
- len = 1 + WideCharToMultiByte (from ? CP_UTF8 : CP_ACP, 0, wide, -1,
- NULL, 0, NULL, NULL);
- out = malloc (len);
- if (out != NULL)
- WideCharToMultiByte (from ? CP_UTF8 : CP_ACP, 0, wide, -1, out, len,
- NULL, NULL);
- free (wide);
- return out;
-#else
- (void)from;
- return (char *)string;
-#endif