Re: [Boost-bugs] [Boost C++ Libraries] #5928: FileSystem runtime error: locale::facet::_S_create_c_locale name not valid

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5928: FileSystem runtime error: locale::facet::_S_create_c_locale name not valid
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-18 11:58:14


#5928: FileSystem runtime error: locale::facet::_S_create_c_locale name not valid
-------------------------------+-------------------------
  Reporter: anonymous | Owner: bemandawes
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: filesystem
   Version: Boost 1.47.0 | Severity: Showstopper
Resolution: fixed | Keywords:
-------------------------------+-------------------------

Comment (by orangetinyterror@…):

 For what it's worth, I was hitting this with version 1.51.0 when passing a
 char[] to any API that implicitly constructs a path. There is a template
 constructor that seems to jump into the locale-resolution stuff (codecvt,
 etc...).

 Casting to or creating a const char * or a std::string seems to bypass
 that works as expected.

 For example:

 {{{
 char dir[] = "/some/path";
 boost::filesystem::exists( dir ); // runtime exception, perhaps dependent
 on env. locale
 boost::filesystem::exists( std::string( dir ) ); // works
 }}}

 There's a comment in path.hpp about this, so I'm not sure it should be
 called a bug or not...

 Hope this helps.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5928#comment:11>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC