aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-06 23:28:58 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-06 23:28:58 +0000
commiteb492e28afd20ccb931ffa0f3d0190257b7f654e (patch)
treed8e63f631f4eb3535026e250352b0254e49be4f1 /gtk
parentb0231277a83ec91cc8489d2765aaf78afd6110e8 (diff)
On Windows, convert all of our command-line arguments from UTF-16 to
UTF-8 where we don't already do so. In Wireshark use g_utf16_to_utf8 instead of utf_16to8. This should fix bug 5520. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35411 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk')
-rw-r--r--gtk/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 343708986f..99a3993c27 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -118,7 +118,6 @@
#include "../capture-wpcap.h"
#include "../capture_wpcap_packet.h"
#include <tchar.h> /* Needed for Unicode */
-#include <wsutil/unicode-utils.h>
#include <commctrl.h>
#include <shellapi.h>
#endif /* _WIN32 */
@@ -2098,7 +2097,7 @@ main(int argc, char *argv[])
wc_argv = CommandLineToArgvW(GetCommandLineW(), &wc_argc);
if (wc_argv && wc_argc == argc) {
for (i = 0; i < argc; i++) {
- argv[i] = g_strdup(utf_16to8(wc_argv[i]));
+ argv[i] = g_utf16_to_utf8(wc_argv[i], -1, NULL, NULL, NULL);
}
} /* XXX else bail because something is horribly, horribly wrong? */
#endif /* _WIN32 */