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

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 174139: Fix Issue 19689: Command line URL parameter does not support Chinese.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « base/command_line.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 24387)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -16,6 +16,7 @@
#include <malloc.h>
#include <new.h>
#elif defined(OS_POSIX)
+#include <locale.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -329,6 +330,12 @@
#endif
#endif
+#if defined(OS_POSIX)
+ // Set C library locale to make sure CommandLine can parse argument values
+ // in correct encoding.
+ setlocale(LC_ALL, "");
+#endif
+
// Initialize the command line.
#if defined(OS_WIN)
CommandLine::Init(0, NULL);
« no previous file with comments | « base/command_line.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698