summaryrefslogtreecommitdiffstats
path: root/base/json_writer.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 23:19:30 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-12 23:19:30 +0000
commit4f2ad3f5ab8550a404d4c70c29938c19110b3ecb (patch)
treeca8af381337293f5a3b1221b6e5a53849af02450 /base/json_writer.cc
parentb377d9cd5c2a3e723dd55b797f52de8d2d41a032 (diff)
downloadchromium_src-4f2ad3f5ab8550a404d4c70c29938c19110b3ecb.zip
chromium_src-4f2ad3f5ab8550a404d4c70c29938c19110b3ecb.tar.gz
chromium_src-4f2ad3f5ab8550a404d4c70c29938c19110b3ecb.tar.bz2
Make unit_tests pass with pt_BR.UTF-8 locale.
BUG=3675 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com> original issue: http://codereview.chromium.org/9509 Review URL: http://codereview.chromium.org/11002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/json_writer.cc')
-rw-r--r--base/json_writer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/json_writer.cc b/base/json_writer.cc
index 10dd39f..4782eb55b 100644
--- a/base/json_writer.cc
+++ b/base/json_writer.cc
@@ -58,7 +58,7 @@ void JSONWriter::BuildJSONString(const Value* const node, int depth) {
double value;
bool result = node->GetAsReal(&value);
DCHECK(result);
- std::string real = StringPrintf("%g", value);
+ std::string real = base::DoubleToString(value, base::LOCALE_INDEPENDENT);
// Ensure that the number has a .0 if there's no decimal or 'e'. This
// makes sure that when we read the JSON back, it's interpreted as a
// real rather than an int.