]> khamidou — GitHub mirrors - electron.git/commitdiff
linux,win: Initalize ICU for node mode
authorCheng Zhao <zcbenz@gmail.com>
Sat, 17 Jan 2015 00:12:12 +0000 (16:12 -0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 17 Jan 2015 00:12:12 +0000 (16:12 -0800)
atom/app/atom_main.cc

index 603f2dc2bcf6ffcde8487b3a44e7da596538e1ec..8c7837ed32780fb94674a06ece932f913cc9344c 100644 (file)
@@ -28,6 +28,8 @@
 #include "atom/app/atom_library_main.h"
 #endif  // defined(OS_MACOSX)
 
+#include "base/i18n/icu_util.h"
+
 // Declaration of node::Start.
 namespace node {
 int Start(int argc, char *argv[]);
@@ -89,6 +91,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
       }
     }
     // Now that conversion is done, we can finally start.
+    base::i18n::InitializeICU();
     return node::Start(argc, argv);
   } else if (env->GetVar("ATOM_SHELL_INTERNAL_CRASH_SERVICE",
                          &crash_service_indicator) &&
@@ -113,8 +116,10 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
 
 int main(int argc, const char* argv[]) {
   char* node_indicator = getenv("ATOM_SHELL_INTERNAL_RUN_AS_NODE");
-  if (node_indicator != NULL && strcmp(node_indicator, "1") == 0)
+  if (node_indicator != NULL && strcmp(node_indicator, "1") == 0) {
+    base::i18n::InitializeICU();
     return node::Start(argc, const_cast<char**>(argv));
+  }
 
   atom::AtomMainDelegate delegate;
   content::ContentMainParams params(&delegate);