msvcrt: Implement _wperror
Hugh McMaster
hugh.mcmaster at outlook.com
Tue Jun 21 05:44:01 CDT 2016
On Tuesday, 21 June 2016 8:37 PM, Hugh McMaster wrote:
>
>>On Tuesday, 21 June 2016 7:04 PM UTC+10, Piotr Caban wrote:
>>>This is not how the function works. It shouldn't print wchar_t string to
>>>stderr. Probably the simplest implementation is to convert input
>>>parameter and call _perror (CP_ACP is not the correct encoding, you can
>>>use MSVCRT_wcstombs).
>>
>I don't understand. The MSDN page [1] contradicts your statement.
>"The perror function prints an error message to stderr. _wperror is a wide-character version
>of _perror; the string argument to _wperror is a wide-character string. _wperror and _perror
>behave identically otherwise."
>
>There is nothing in that quote to suggest _wperror does operate like my implementation.
Bad typo. This should say: "There is nothing in that quote to suggest _wperror does not
operate like my implementation."
>Also, if we convert the wide string to multibyte, there is a risk any non-Unicode characters
>supplied as input will not display correctly. So, IMHO converting to a multibyte string is a
>bad approach.
>
>Still, if that's what you want, I'll do it.
>
>[1] https://msdn.microsoft.com/en-us/library/9t0e6085.aspx
More information about the wine-devel
mailing list