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 |