diff --git a/.travis.yml b/.travis.yml index a9cd3167ff..f25d6bcbdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,4 +20,3 @@ addons: - libboost-thread1.55-dev - libboost-system1.55-dev - libboost-filesystem1.55-dev - - libboost-locale1.55-dev diff --git a/xs/Build.PL b/xs/Build.PL index 6d4342bf1d..8a111c1a44 100644 --- a/xs/Build.PL +++ b/xs/Build.PL @@ -47,7 +47,7 @@ if (defined $ENV{BOOST_DIR}) { # In order to generate the -l switches we need to know how Boost libraries are named my $have_boost = 0; -my @boost_libraries = qw(system thread filesystem locale); # we need these +my @boost_libraries = qw(system thread filesystem); # we need these # check without explicit lib path (works on Linux) $have_boost = 1 diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp index b76550a092..372b7b1b03 100644 --- a/xs/src/libslic3r/Config.cpp +++ b/xs/src/libslic3r/Config.cpp @@ -4,14 +4,10 @@ #include #include #include -#include #include // std::runtime_error #include #include -#include -#include #include -#include #include #include @@ -218,32 +214,21 @@ ConfigBase::load(const std::string &file) void ConfigBase::save(const std::string &file) const { - // Get the default locale - std::locale loc = boost::locale::generator().generate(""); + using namespace std; + ofstream c; + c.open(file.c_str(), ios::out | ios::trunc); - // Set the global locale to loc - std::locale::global(loc); - - // Make boost.filesystem use it by default - boost::filesystem::path::imbue(std::locale()); - - // Create the path (file is assumed to be be utf-8) - boost::filesystem::path path(file); - - boost::filesystem::ofstream c; - c.open(path, std::ios::out | std::ios::trunc); - { time_t now; time(&now); char buf[sizeof "0000-00-00 00:00:00"]; strftime(buf, sizeof buf, "%F %T", gmtime(&now)); - c << "# generated by Slic3r " << SLIC3R_VERSION << " on " << buf << std::endl; + c << "# generated by Slic3r " << SLIC3R_VERSION << " on " << buf << endl; } - + t_config_option_keys my_keys = this->keys(); for (t_config_option_keys::const_iterator opt_key = my_keys.begin(); opt_key != my_keys.end(); ++opt_key) - c << *opt_key << " = " << this->serialize(*opt_key) << std::endl; + c << *opt_key << " = " << this->serialize(*opt_key) << endl; c.close(); }