<ul dir="auto">
<li>Electron version: <strong>v1.3.5</strong></li>
<li>Operating system: <strong>win7 x64</strong></li>
</ul>
<p dir="auto">I have created a simple example here: there are only two files in the directory: <em>package.json</em> and <em>main.js</em>. I'm sured that they are saved by UTF-8 encoding.<br>
There are only two keys in <em>package.json</em>: <em>name</em> and <em>main</em>, just like this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;name&quot;:&quot;simple-example&quot;,
    &quot;main&quot;:&quot;main.js&quot;
}"><pre class="notranslate"><code class="notranslate">{
    "name":"simple-example",
    "main":"main.js"
}
</code></pre></div>
<p dir="auto">the <em>main.js</em> has only one line:<br>
<code class="notranslate">console.log("中文")</code></p>
<p dir="auto">When I run <code class="notranslate">electron .</code> under that directory, the output on console is not right.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/15317435/18348113/1560a882-75fc-11e6-9929-674bdc18584c.png"><img src="https://cloud.githubusercontent.com/assets/15317435/18348113/1560a882-75fc-11e6-9929-674bdc18584c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">While if I run node main.js, I can see the expected result:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/15317435/18348148/42ca86bc-75fc-11e6-8692-ccb7a5740d7c.png"><img src="https://cloud.githubusercontent.com/assets/15317435/18348148/42ca86bc-75fc-11e6-8692-ccb7a5740d7c.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I think there are something wrong with encoding, can anyone here tell me how to fix it and why?</p>
<p dir="auto">I noticed that I cannot print characters such as 'ρ' or 'β' from Electron to the console on Windows (works fine on Linux and OS X). I tried this using the default command prompt and power shell; also made sure both terminals were printing the characters otherwise (works fine with <code class="notranslate">node -e "console.log('β')"</code>). When printing from Electron it does not work (tested in both Main and Renderer with <code class="notranslate">console.log</code> and <code class="notranslate">process.stdout.write</code>).</p>
<p dir="auto">Possibly related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="96799843" data-permission-text="Title is private" data-url="https://github.com/electron/electron/issues/2311" data-hovercard-type="issue" data-hovercard-url="/electron/electron/issues/2311/hovercard" href="https://github.com/electron/electron/issues/2311">#2311</a></p>
<ul dir="auto">
<li>Electron version: 1.1.3</li>
<li>Operating system: Windows 8.1</li>
</ul>