8 May
2019
8 May
'19
12:35 p.m.
I am getting a crash on Windows when passing a path that contains umlauts (like sampëüö ) to the path constructor. I tried boost 1.69 and boost 1.60. Here's the code I am using: namespace fs = boost::filesystem; const char* tmp = setlocale(LC_ALL, N_("")); // Create and install global locale std::locale::global(boost::locale::generator().generate( N_("") )); // Make boost.filesystem use it fs::path::imbue(std::locale()); if ( !tmp ) tmp = setlocale( LC_ALL, NULL ); std::string program = argv[0]; fs::path file = fs::path( program ); // CRASH -- Gonzalo Garramuño