diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 2 | ||||
-rw-r--r-- | apt-pkg/acquire.cc | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 4 | ||||
-rw-r--r-- | apt-pkg/install-progress.cc | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 334ed63a6..906ed9d8e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1836,7 +1836,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ HashStringList ServerHashes; unsigned long long ServerSize = 0; - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type) { std::string tagname = *type; diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 3ce2e0d5a..145cbd56d 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1248,7 +1248,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // build the status str std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; auto const dlstatus = str.str(); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index ca924e578..61a86a479 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -754,7 +754,7 @@ string TimeRFC1123(time_t Date) if (gmtime_r(&Date, &Conv) == NULL) return ""; - auto const posix = std::locale("C.UTF-8"); + auto const posix = std::locale::classic(); std::ostringstream datestr; datestr.imbue(posix); datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT"); @@ -934,7 +934,7 @@ bool RFC1123StrToTime(const char* const str,time_t &time) signed int year = 0; // yes, Y23K problem – we gonna worry then… std::string weekday, month, datespec, timespec, zone; std::istringstream ss(str); - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); ss.imbue(posix); ss >> weekday; // we only superficially check weekday, mostly to avoid accepting localized diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index 7acd61f65..c73275392 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -83,7 +83,7 @@ static std::string GetProgressFdString(char const * const status, { float const progress{Done / static_cast<float>(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << status << ':' << pkg << ':' << std::fixed << progress << ':' << msg << '\n'; return str.str(); @@ -164,7 +164,7 @@ static std::string GetProgressDeb822String(char const * const status, { float const progress{Done / static_cast<float>(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "Status: " << status << '\n'; if (pkg != nullptr) |