aboutsummaryrefslogtreecommitdiffstats
path: root/tfshark.c
diff options
context:
space:
mode:
Diffstat (limited to 'tfshark.c')
-rw-r--r--tfshark.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tfshark.c b/tfshark.c
index e079749c75..fcd1f6b520 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -348,8 +348,15 @@ main(int argc, char *argv[])
static const char optstring[] = OPTSTRING;
- /* Set the C-language locale to the native environment. */
+ /*
+ * Set the C-language locale to the native environment and set the
+ * code page to UTF-8 on Windows.
+ */
+#ifdef _WIN32
+ setlocale(LC_ALL, ".UTF-8");
+#else
setlocale(LC_ALL, "");
+#endif
cmdarg_err_init(failure_warning_message, failure_message_cont);