Skip to content
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

wmain support #49

Open
zhihaoy opened this issue Nov 14, 2019 · 2 comments
Open

wmain support #49

zhihaoy opened this issue Nov 14, 2019 · 2 comments

Comments

@zhihaoy
Copy link
Contributor

zhihaoy commented Nov 14, 2019

A boss

https://docs.microsoft.com/en-us/cpp/c-language/using-wmain?view=vs-2019

That all C++ cmdline parsing libraries face.

A strong demand is to construct std::path from command-line arguments, where std::wstring is native string type for std::path on Windows.

In past experience, Boost.Program_options (Sphinx docs) is the only library that allowed me to program wmain in real code. But Boost's choice is to template everything on character type while still supporting some codecvt conversions internally. Using only wvalue may work for some applications, but in general wcommand_line_parser is needed.

Given argparse' type erasure design, we have an opportunity to look at the problem differently.

@AlexanderRevo
Copy link

Seems like Windows has support for UTF-8 in main since Windows Version 1903 (May 2019 Update) (MSDN link).

We might be able to use argparse on Windows with Unicode support without any extra changes to the library.

@Theodikes
Copy link

In past experience, Boost.Program_options (Sphinx docs) is the only library that allowed me to program wmain in real code. But Boost's choice is to template everything on character type while still supporting some codecvt conversions internally. Using only wvalue may work for some applications, but in general wcommand_line_parser is needed.

Changed argparse to handle wmain correctly, see this issue: #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants