From b58e2c7c56b1416a343e81f9f80cb1f02c128e25 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 27 May 2016 18:10:39 +0200 Subject: prevent C++ locale number formatting in text APIs Setting the C++ locale via std::locale::global(std::locale("")); which would otherwise default to the default C locale (aka: unaffected by setlocale) effects the formatting of numeric types in IO streams, which for output for humans is perfectly sensible, but breaks our many text interfaces used and parsed by us and others without expecting the numbers to be formatted. Closes: #825396 --- apt-private/private-source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-private/private-source.cc') diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc index 5053c60fc..dd52a8822 100644 --- a/apt-private/private-source.cc +++ b/apt-private/private-source.cc @@ -478,8 +478,8 @@ bool DoSource(CommandLine &CmdL) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); ++I) - std::cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << - I->Owner->FileSize << ' ' << I->Owner->HashSum() << std::endl; + std::cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + std::to_string(I->Owner->FileSize) << ' ' << I->Owner->HashSum() << std::endl; return true; } -- cgit v1.2.3-70-g09d2