# HG changeset patch # User Stu Tomlinson # Date 1116078723 0 # Node ID 44e91a7708ebd60723a695ec6d0e6cb68a2a21cb # Parent dcbc56eb3f37f3f06d2064592737a0b5c5ea7fa5 [gaim-migrate @ 12669] Fix 1196574 - invalid charset when executing commands Could someone check that this doesn't break anything on windows please? committer: Tailor Script diff -r dcbc56eb3f37 -r 44e91a7708eb src/gtkpounce.c --- a/src/gtkpounce.c Sat May 14 13:20:37 2005 +0000 +++ b/src/gtkpounce.c Sat May 14 13:52:03 2005 +0000 @@ -1014,11 +1014,13 @@ if (gaim_pounce_action_is_enabled(pounce, "execute-command")) { const char *command; + char *localecmd; command = gaim_pounce_action_get_attribute(pounce, "execute-command", "command"); + localecmd = g_locale_from_utf8(command, -1, NULL, NULL, NULL); - if (command != NULL) + if (localecmd != NULL) { #ifndef _WIN32 int pid = fork(); @@ -1028,7 +1030,7 @@ args[0] = "sh"; args[1] = "-c"; - args[2] = (char *)command; + args[2] = (char *)localecmd; args[3] = NULL; execvp(args[0], args); @@ -1049,6 +1051,7 @@ command); #endif /* !_WIN32 */ } + g_free(localecmd); } if (gaim_pounce_action_is_enabled(pounce, "play-sound"))