-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Win32 UNICODE wmain support #903
Conversation
In case it is accepted, I guess a specific build on AppVeyor should be added, with "/SUBSYSTEM:CONSOLE /ENTRY:wmainCRTStartup" as parameters. I could do that, if I'm allowed. |
I not against the change, but I have to ask what is the intended benefits of these changes? Catch will not be able to work with utf-8 encoded arguments anyway (well, not at this point) and tests should be able to have Is there anything else that also changes when |
The problem occurs if someone uses wmainCRTStartup in its project, or MinGW-w64 GCC with -municode flag. The are no benefits in terms of performance, or for the UNICODE support in the strict meaning (as you said), but it will save a developer from writing the same code that I wrote in order to adapt the wmain interface to the Catch::Session run method. Short answer: it's just a convenience to have it working even when the above switches are ON, and you don't have to care about adapting the code, cause wmain has wchar_t **, and not char **, as argv type. |
I took another look and if you add proper configurations to AppVeyor, Ill merge it in. If we add proper utf-8 support to Catch we might to go back and add error checking for invalid conversion, but right now non-ascii character set might break things anyway, no need for malformed utf. |
I've added proper configurations in appveyor.yml. |
Thanks for fixing appveyor.yml! |
Description
Added alternate main definition, available on Win32 platforms, when UNICODE
support is enabled. argv command line is a wchar_t, so Catch run interface should
be adapted in order to manage it.