<p>In <a href="https://github.com/geany/geany/pull/637#discussion_r38775687">src/utils.c</a>:</p>
<pre style='color:#555'>> +                            gboolean val = *(gboolean *)optentry->arg_data;
> +                          gboolean reverse = (optentry->flags & G_OPTION_FLAG_REVERSE);
> +                          if ((val && !reverse) || (!val && reverse)) /* logical XOR */
> +                                  s = g_strdup_printf("--%s", optentry->long_name);
> +                  }
> +                  break;
> +
> +          case G_OPTION_ARG_INT:
> +                  if (*(gint *)optentry->arg_data)
> +                          s = g_strdup_printf("--%s=%d", optentry->long_name, *(gint *)optentry->arg_data);
> +                  break;
> +
> +          case G_OPTION_ARG_STRING:
> +          case G_OPTION_ARG_FILENAME:
> +                  if (*(gchar **)optentry->arg_data)
> +                          s = g_strdup_printf("--%s=%s", optentry->long_name, *(gchar **)optentry->arg_data);
</pre>
<p>Actually, we have no STRING, so I'll discard it (the original SM option reproducer by Eugene supported even string and filename arrays, but I removed them at some point as unneeded).</p>

<p>As of the FILENAME, GLib says "returned in the GLib filename encoding", which is native for POSIX and UTF-8 under Windows. So a conversion is probably needed under Windows (that didn't matter for SM, which is *nix only). I'll test it to be sure.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/637/files#r38775687">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxG7DExFFXhT4M9pm4t9DDdn9KTqks5ouc7igaJpZM4F1KFb.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/637/files#r38775687"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>