==== boost_1_55_0/libs/filesystem/src/path.cpp#1 - boost_1_55_0/libs/filesystem/src/path.cpp ==== 799,800c799 < #if defined(BOOST_WINDOWS_API) && defined(BOOST_FILESYSTEM_STATIC_LINK) < --- > #if defined(BOOST_WINDOWS_API) 803,805c802 < std::locale global_loc = std::locale(); < std::locale loc(global_loc, new windows_file_codecvt); < return loc; --- > return std::locale(std::locale(), new windows_file_codecvt); 808,830d804 < inline std::locale& path_locale() < { < static std::locale loc(default_locale()); < return loc; < } < < inline const path::codecvt_type*& codecvt_facet_ptr() < { < static const std::codecvt* < facet( < &std::use_facet > < (path_locale())); < return facet; < } < < #elif defined(BOOST_WINDOWS_API) && !defined(BOOST_FILESYSTEM_STATIC_LINK) < < std::locale path_locale(std::locale(), new windows_file_codecvt); < < const std::codecvt* < codecvt_facet_ptr(&std::use_facet > < (path_locale)); < 852,858c826,829 < std::locale path_locale(std::locale(), < new boost::filesystem::detail::utf8_codecvt_facet); < < const std::codecvt* < codecvt_facet_ptr(&std::use_facet > < (path_locale)); < --- > inline std::locale default_locale() > { > return std::locale(std::locale(), new boost::filesystem::detail::utf8_codecvt_facet); > } 868,869c839,842 < std::locale path_locale; // initialized by path::codecvt() below < const std::codecvt* codecvt_facet_ptr; // ditto --- > inline std::locale default_locale() > { > return std::locale(""); > } 872a846,859 > inline std::locale& path_locale() > { > static std::locale loc(default_locale()); > return loc; > } > > inline const path::codecvt_type*& codecvt_facet_ptr() > { > static const std::codecvt* > facet( > &std::use_facet > > (path_locale())); > return facet; > } 883,885d869 < < #if defined(BOOST_WINDOWS_API) && defined(BOOST_FILESYSTEM_STATIC_LINK) < 900,927d883 < < #else < < const path::codecvt_type& path::codecvt() < { < # if defined(BOOST_POSIX_API) && \ < !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) < // A local static initialized by calling path::imbue ensures that std::locale(""), < // which may throw, is called only if path_locale and condecvt_facet will actually < // be used. Thus misconfigured environmental variables will only cause an < // exception if a valid std::locale("") is actually needed. < static std::locale posix_lazy_initialization(path::imbue(std::locale(""))); < # endif < return *codecvt_facet_ptr; < } < < std::locale path::imbue(const std::locale& loc) < { < std::locale temp(path_locale); < path_locale = loc; < codecvt_facet_ptr = < &std::use_facet >(path_locale); < return temp; < } < < < #endif <