]> git.saurik.com Git - apt.git/commit
prevent C++ locale number formatting in text APIs
authorDavid Kalnischkies <david@kalnischkies.de>
Fri, 27 May 2016 16:10:39 +0000 (18:10 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 1 Jun 2016 12:24:33 +0000 (14:24 +0200)
commit55c6402be4297d644de774b1fef70b88f91a73e9
tree667cd179c731fe69b139b46ed4b3d2a13deee672
parentb1b149ca440d954bb8a52b30cf16e84cd82c7fbc
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
(cherry picked from commit b58e2c7c56b1416a343e81f9f80cb1f02c128e25)
14 files changed:
apt-pkg/acquire-method.cc
apt-pkg/acquire.cc
apt-pkg/contrib/strutl.cc
apt-pkg/deb/debindexfile.cc
apt-pkg/install-progress.cc
apt-private/private-source.cc
apt-private/private-update.cc
cmdline/apt-helper.cc
ftparchive/writer.cc
methods/http.cc
methods/server.cc
test/integration/test-apt-download-progress
test/integration/test-apt-progress-fd
test/integration/test-apt-progress-fd-deb822