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

Side by Side Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 11377113: ChromeOS needs UTF-8 appended to locale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/debug/debugger.h" 6 #include "base/debug/debugger.h"
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 base::i18n::SetICUDefaultLocale(locale); 61 base::i18n::SetICUDefaultLocale(locale);
62 62
63 #if defined(OS_POSIX) && !defined(OS_ANDROID) 63 #if defined(OS_POSIX) && !defined(OS_ANDROID)
64 // TODO(shess): Flash appears to have a POSIX locale dependency 64 // TODO(shess): Flash appears to have a POSIX locale dependency
65 // outside of the existing PPAPI ICU support. Certain games hang 65 // outside of the existing PPAPI ICU support. Certain games hang
66 // while loading, and it seems related to datetime formatting. 66 // while loading, and it seems related to datetime formatting.
67 // http://crbug.com/155396 67 // http://crbug.com/155396
68 // http://crbug.com/155671 68 // http://crbug.com/155671
69 // 69 //
70 // ICU can accept "en-US" or "en_US", but POSIX wants "en_US". 70 // ICU can accept "en-US" or "en_US", but POSIX wants "en_US".
71 // TODO(shess): "en_US.UTF-8" might be even better.
72 std::replace(locale.begin(), locale.end(), '-', '_'); 71 std::replace(locale.begin(), locale.end(), '-', '_');
72 locale.append(".UTF-8");
73 setlocale(LC_ALL, locale.c_str()); 73 setlocale(LC_ALL, locale.c_str());
74 setenv("LANG", locale.c_str(), 0); 74 setenv("LANG", locale.c_str(), 0);
75 #endif 75 #endif
76 } 76 }
77 77
78 MessageLoop main_message_loop; 78 MessageLoop main_message_loop;
79 base::PlatformThread::SetName("CrPPAPIMain"); 79 base::PlatformThread::SetName("CrPPAPIMain");
80 80
81 #if defined(OS_LINUX) 81 #if defined(OS_LINUX)
82 InitializeSandbox(); 82 InitializeSandbox();
83 #endif 83 #endif
84 84
85 ChildProcess ppapi_process; 85 ChildProcess ppapi_process;
86 ppapi_process.set_main_thread( 86 ppapi_process.set_main_thread(
87 new PpapiThread(parameters.command_line, false)); // Not a broker. 87 new PpapiThread(parameters.command_line, false)); // Not a broker.
88 88
89 main_message_loop.Run(); 89 main_message_loop.Run();
90 return 0; 90 return 0;
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698