Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1000)

Unified Diff: base/json_reader.cc

Issue 11002: Make unit_tests pass with pt_BR.UTF-8 locale. (Closed)
Patch Set: all platforms Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base_unittests.scons ('k') | base/json_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json_reader.cc
diff --git a/base/json_reader.cc b/base/json_reader.cc
index c0e019b7df52c00a841ccb1b2b247bd594bd6aa4..15d43cc3cf59ebe783bfe60b09c78793e9c72222 100644
--- a/base/json_reader.cc
+++ b/base/json_reader.cc
@@ -329,7 +329,8 @@ bool JSONReader::DecodeNumber(const Token& token, Value** node) {
}
double num_double;
- if (StringToDouble(num_string, &num_double) && base::IsFinite(num_double)) {
+ if (base::StringToDouble(num_string, &num_double, base::LOCALE_INDEPENDENT) &&
+ base::IsFinite(num_double)) {
*node = Value::CreateRealValue(num_double);
return true;
}
« no previous file with comments | « base/base_unittests.scons ('k') | base/json_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698