eric pouech (@epo) commented about programs/cmd/builtins.c:
return NO_ERROR;
}
+/****************************************************************************
- WCMD_convert_text
- Converts bytes to wide characters in the specified code page.
- */
+static int WCMD_convert_text(UINT codepage, char *buffer, DWORD count, LPWSTR *outBuf) +{
- int numChars;
- numChars = MultiByteToWideChar(codepage, 0, buffer, count, NULL, 0);
you're doing things in reverse
what's the cp 'buffer' is encoded in? it's not encoded in 'codepage' as it's the expected *output* code page
this means you didn't even compare the output between native and (modified) builtin with small examples (which give different output when using different codepages)
please start by doing this and submit this MR when these manual tests pass (it would be better if you we could integrate that to test harness, but that's not doable for now, so you have to do it by hand)