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

Unified Diff: chrome/app/chrome_main.cc

Issue 6347045: linux: set LC_NUMERIC to C for all non-browser processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 months 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 | « no previous file | chrome/browser/zygote_main_linux.cc » ('j') | chrome/browser/zygote_main_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index edd4c0d0726f473312d86a8ebb9f41bd3d4b44c0..38019de44a1367f9bfcb497b6fc39dfd07cf335c 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -372,6 +372,17 @@ void CommonSubprocessInit() {
MSG msg;
PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
#endif
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+ // Various things break when you're using a locale where the decimal
+ // separator isn't a period. See e.g. bugs 22782 and 39964. For
+ // all processes except the browser process (where we call system
+ // APIs that may rely on the correct locale for formatting numbers
+ // when presenting them to the user), reset the locale for numeric
+ // formatting.
+ // Note that this is not correct for plugin processes -- they can
+ // surface UI -- but it's likely they get this wrong too so why not.
+ setlocale(LC_NUMERIC, "C");
piman 2011/01/31 23:11:01 I'm not sure setting it for plugins is a good idea
+#endif
}
// Returns true if this subprocess type needs the ResourceBundle initialized
« no previous file with comments | « no previous file | chrome/browser/zygote_main_linux.cc » ('j') | chrome/browser/zygote_main_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698