<blockquote>
<p>Agreed. Unfortunately, a locale-encoded directory won't work here. For some reason, there is a difference with cmd.exe. On my system, the system locale is Windows-1252 but cmd.exe uses CP850. So if I would encode the directory into the system locale, cmd.exe won't accept it.<br>
But if I convert the whole script content into the system codepage, it works fine. This is what I did in <a href="https://github.com/geany/geany/commit/a95f174fe1ab0707c8fc092fceb9294cb92123b3" class="commit-link"><tt>a95f174</tt></a> to get rid of the ugly <code>chcp</code> thing. So we also convert the program/script filename which is to be executed, as it is affected in the same way, as mentioned above.<br>
And as in the changes mentioned above for spawn.c, here the codepage conversion is also only performed if the input string is valid UTF-8.</p>
</blockquote>

<p>Okay, that sounds better indeed than temporarily changing the codepage -- and if we needed to change it anyway, wouldn't it be better for us to change it for the whole script.<br>
Anyway yeah, converting the script looks like a good idea -- although it might not be possible with some CPs, and if the console has a different one than the system, it might actually happen :S</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1095#issuecomment-229127855">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABDrJ5NrtSpBFFQCg2lGVuD8m9MYJiXEks5qQV7cgaJpZM4I_lTo">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxwWNoi69yP7_z5CQliJLpNdOOeXks5qQV7cgaJpZM4I_lTo.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/1095#issuecomment-229127855"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>