-
Notifications
You must be signed in to change notification settings - Fork 92
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
Windows only: Consider using __argc and __argv #15
Comments
Windows programs have their arguments stored in the structure
The C library startup code parses the string, assign and allocate So, wouldn't it be easier to pass the unaltered command line string as is to
|
Thanks for your enthusiasm for Argh!
I don't have a lot of experience with parsing Unicode in general nor on Unicode variants on Windows in particular, so it is hard for me to comment. Would you like to make a pull request? |
Thanks for answering. Just FYI, getting direct access to command line buffer in PEB via |
I’m not a Unicode expert but I know the way Windows handles Unicode is messed up. I took the liberty to consult some of the more knowledgeable Unicode/C++ experts on Twitter (where else 😆). |
Seems like the only sane and portable thing to do is UTF8 only.
Essentially converting anything to UTF8 as shown here:
If you need the data in some other encoding (e.g. for passing to WIN32 componenets) do it on the other end. |
Thank you for your effort. However, your answer doesn't address the subject. My point was about using the |
On Windows there is an extension to get the args automatically without passing them in, as in:
Things to note:
__argv
et al. perform wildcard expansion, which may or may not be desirable.The text was updated successfully, but these errors were encountered: