Boost logo

Boost Users :

Subject: [Boost-users] filesystem::path crash on Windows when dealing with umlauts ( üëï )
From: Gonzalo Garramuño (ggarra13_at_[hidden])
Date: 2019-05-08 12:35:50


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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net