)]}'
{
  "commit": "9a9215bec104aae68405396be441f6d85d04bcb7",
  "tree": "72cb70b4c3fbe105f572d06f962bf520780fc109",
  "parents": [
    "24e72a80ce025bdb5571dc1c5fa9a7b8c3e6f22f"
  ],
  "author": {
    "name": "Javid Khan",
    "email": "dxbjavid@gmail.com",
    "time": "Mon Jun 22 10:43:28 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Jun 22 10:43:51 2026 -0700"
  },
  "message": "PR #2085: Read float round-trip locale-independently in PrintPreciseFP\n\nImported from GitHub PR https://github.com/abseil/abseil-cpp/pull/2085\n\nGenericPrint shortens floating-point output in TryShorten by\nformatting the value with absl::StrFormat and then reading it back to\nconfirm the shorter form still round-trips. absl::StrFormat is\nlocale-independent and always writes a full stop as the radix, but the\nread-back for float and double went through std::strtof and\nstd::strtod, which honour LC_NUMERIC. In a process that has called\nsetlocale to a comma-radix locale such as de_DE or fr_FR those readers\nstop at the full stop, so the shortened candidate never compares equal\nand the printer quietly falls back to the long form; for instance 1.1\nprints as 1.10000000000000009.\n\nRouting the float and double check through absl::SimpleAtof and\nabsl::SimpleAtod, which are locale-independent, lines the parse up\nwith the formatter and keeps the shortening working everywhere. The\nlong double overload still uses std::strtold as there is no\nlocale-independent long double parser to switch to.\n\nMerge e67cf792630387b70b086724f01adb1970c9f2a2 into ce2e0bc69560bf3287928864f780faa4daed4dd0\n\nMerging this change closes #2085\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/abseil/abseil-cpp/pull/2085 from dxbjavid:generic-printer-fp-locale e67cf792630387b70b086724f01adb1970c9f2a2\nPiperOrigin-RevId: 936136258\nChange-Id: I8763cea760c1988388d639473e624813fe62f21c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "def78d53569190bf889d349954c37e283cb2df1d",
      "old_mode": 33188,
      "old_path": "absl/strings/BUILD.bazel",
      "new_id": "20149f19d0207466e8c4009b2d238a89f0ceb045",
      "new_mode": 33188,
      "new_path": "absl/strings/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "e6b5da37b8a0b27b8487d4c2fa8b3ab0e4827a5a",
      "old_mode": 33188,
      "old_path": "absl/strings/CMakeLists.txt",
      "new_id": "41fe3c085d1ec6c66a51afaef55e88ee5268ba11",
      "new_mode": 33188,
      "new_path": "absl/strings/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "16ca2288094b6ee16e7bc4735d8de4bd7c1723d9",
      "old_mode": 33188,
      "old_path": "absl/strings/internal/generic_printer.cc",
      "new_id": "6535e1c57fa8d37e5457f109e4f3eb847e786708",
      "new_mode": 33188,
      "new_path": "absl/strings/internal/generic_printer.cc"
    },
    {
      "type": "modify",
      "old_id": "f5b737b4f368cb469505493aeed70a25bdcdad39",
      "old_mode": 33188,
      "old_path": "absl/strings/internal/generic_printer_test.cc",
      "new_id": "071bf760514827a64aa766360e331c63477bca7e",
      "new_mode": 33188,
      "new_path": "absl/strings/internal/generic_printer_test.cc"
    }
  ]
}
