[Windows] Switched to wmain to accept non-ascii characters from command line by AndreaMarangoni · Pull Request #8519 · osquery/osquery
Fixes #7923
From this #7923 (comment) I implemented solution 1, switching from main to wmain, as the quickest and cleanest to implement.
These changes make sense to me, but when I tried testing on my Windows VM it still crashed with the ä character as in the bug report.
Did it work for you @AndreaMarangoni? If so, I will try doing it again to see if I may have made a mistake in my testing.
These changes make sense to me, but when I tried testing on my Windows VM it still crashed with the
ächaracter as in the bug report.Did it work for you @AndreaMarangoni? If so, I will try doing it again to see if I may have made a mistake in my testing.
No you were right. The linkage to wmain was actually broken and it was calling main still. My testing was right, but then realised I was linking wmain everywhere. So I reduced the scope of /ENTRY:wmain... to only osqueryd target before re-testing, without realising the linkage was actually broken. Maybe a good idea would have been to rename the main function to something else.
Thank you for testing it!
Now it should work fine.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working for me now, thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters