title: nkf UTF-8 conversion modifies Chinese characters
body: <p>So I have a file tmp.ahk that contains Chinese characters,</p>
  <pre><code>$ cat tmp.ahk
  sendText(&quot;结婚吧&quot;)
  </code></pre>
  <p>and I wanted to convert the file to UTF-8 (with BOM) file. (The BOM is because in the later steps Autohotkey requires files to be BOM-ed)</p>
  <pre><code>$ file tmp.ahk 
  tmp.ahk: UTF-8 Unicode text
  </code></pre>
  <p>So I used the nkf command to convert the file to a UTF-8 with BOM file, I did the following.</p>
  <pre><code>$ bash -c &quot;nkf --overwrite --oc=UTF-8-BOM ./tmp.ahk&quot;
  
  $ file tmp.ahk
  tmp.ahk: UTF-8 Unicode (with BOM) text
  </code></pre>
  <p>But after that I found that the file content, the Chinese text part is modified to a garbled</p>
  <pre><code>$ cat tmp.ahk
  sendText(&quot;扈灘ゥ壼制&quot;)
  </code></pre>
  <p>What is causing this issue? How can I convert a file that contains Chinese texts to UTF8-BOM without getting a garbled? Thanks.</p>