aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-24 02:35:46 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-06-24 02:35:46 +0000
commit343c20e2157cd11d9a1fd054200a5ed11729d99d (patch)
tree02939e1f85a0f1377270164d962c27f1aad67b03 /gtk/main.c
parent0501a4855248a362295f250f3770aae28f001072 (diff)
Make Wireshark portable to all locales by calling setlocale(). This, along with my previous commits in revisions 36160 and 36166 ought to fix the problem that Bartosz Kiziukiewicz first reported on the wireshark-users mailing list here:
http://www.wireshark.org/lists/wireshark-users/201103/msg00018.html (I successfully generated Wireshark compare statistics after applying this change and also changing my locale to Polish.) svn path=/trunk/; revision=37779
Diffstat (limited to 'gtk/main.c')
-rw-r--r--gtk/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 4808a28562..4b4142e736 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <locale.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -2064,6 +2065,8 @@ main(int argc, char *argv[])
static const char optstring[] = OPTSTRING;
+ /* Set the C-language locale to the native environment. */
+ setlocale(LC_ALL, "");
#ifdef _WIN32
arg_list_utf_16to8(argc, argv);
#endif /* _WIN32 */