<p>This should fix problems when the command line or the working directory<br>
of a command on Windows contains non-ASCII characters.<br>
Those characters are first converted into a multi-byte string and then<br>
passed to CreateProcessW().</p>

<p>Closes <a href="https://github.com/geany/geany/issues/784" class="issue-link" title='On Windows cannot execute grep tool "grep" if target path contain non ascii folder name'>#784</a>.</p>

<p>I hope this won't have any unwanted side-effects. My tests were successfully and it solves the problem reported in <a href="https://github.com/geany/geany/issues/784" class="issue-link" title='On Windows cannot execute grep tool "grep" if target path contain non ascii folder name'>#784</a>.<br>
The error handling seems a bit weird but actually works. The error strings are not marked as translatable on purpose because a) they are very technically and b) unlikely to happen at all.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/809'>https://github.com/geany/geany/pull/809</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Use multi-byte variant of CreateProcess on Windows</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/809/files#diff-0">src/spawn.c</a>
    (29)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/809.patch'>https://github.com/geany/geany/pull/809.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/809.diff'>https://github.com/geany/geany/pull/809.diff</a></li>
</ul>

<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/809">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ-7-jVkrFxBPUl7dxyKULiYs3OtWks5pPZC-gaJpZM4G0VWF.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/809"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>