Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix locale, charset and filesystem path related issue
Using the "C" locale as default does not cover more "exotic" paths, which can result in exceptions thrown by boost::filesystem::path. boost::filesystem::path::imbue() returns the "previously used locale", which should be the "right one", if called in a pristine environment, or to put it another way: if imbue() wouldn't be called at all, then this appears to be the one boost::filesystem::path would use. In this patch, a dummy locale is used to extract the internal locale, to use it explicitly, which seems to be a preferable choice, because the goal is not to modify the locale at all, but to prevent deinitialization issues, and the bad-environment-fallback also kicks in earlier.
- Loading branch information