-
Notifications
You must be signed in to change notification settings - Fork 360
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
UTF8/Unicode config filename not supported on Windows #912
Comments
What is the code you are using to parse the arguments? |
Here is the code to reproduce cli11_bug912.tgz And the command: # Non accentuated config works
$ cli11_bug --print foo > config
$ cli11_bug -c config
foo
$ cp config déjà
$ cli11_bug -c déjà
déjà was not readable (missing?)
Run with --help for more information. #include <CLI/CLI.hpp>
#include <iostream>
#include <string>
#ifdef _WIN32
int wmain(int argc, wchar_t* argv[])
#else
int main(int argc, char* argv[])
#endif
{
std::string filename;
CLI::App app("cli11_bug");
app.set_config("-c,--config");
app.add_flag("--print", "Print configuration and exit")->configurable(false);
app.add_option("file", filename, "File to process");
CLI11_PARSE(app);
if (app.get_option("--print")->as<bool>())
{
std::cout << app.config_to_str(true, true);
return 0;
}
std::cout << filename << std::endl;
return 0;
} |
I am using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I create a config filename with non ascii characters,
./my_app --print > déjà
When I call:
./my_app --config déjà
, I got:The text was updated successfully, but these errors were encountered: