title: Saving utf-8 encoded text with numpy.savetxt
body: <p>My input:</p>
  
  <pre><code>??AAAAT 66.5939
  ??AAAAW 63.3312
  ??AAAAZ 63.3312
  ??AAAĄB 58.0579
  ??AAAĄD 81.3312
  ??AAAĄF 87.3312
  ??AAAĄG 64.5562
  ??AAAĄH 63.3687
  ??AAAĄK 81.3312
  ??AAAĄL 81.3312
  ??AAAĄM 81.3312
  ??AAAĄN 79.3312
  </code></pre>
  
  <p>I have a script that takes the average of the second column, subtracts it from the original value and saves the modified columns to another file:</p>
  
  <pre><code>import numpy as np
  
  def calculateAverage():
      '''real values of leaves should be averaged over all possible leaves'''
  
      values = np.loadtxt("input/leaves.txt", usecols=(1,))
      leaves = np.loadtxt("input/leaves.txt", dtype='str', usecols=(0,))
  
      values -= np.mean(values)
      outputFile = open("output/leaves.txt", 'w')
  
      for i, elem in enumerate(leaves):
          outputFile.write('%s %f\n' % (leaves[i], values[i]))
  
      outputFile.close()
  </code></pre>
  
  <p>Now, I am trying to do the same with a record array:</p>
  
  <pre><code>import numpy as np
  def calculateAverage1():
      '''real values of leaves should be averaged over all possible leaves'''
  
      values = np.loadtxt("input/leaves.txt", dtype=[('key', 'S8'), ('val', 'f8')])
  
      values['val'] -= np.mean(values['val'])
  
      np.savetxt("output/leaves.txt", values, fmt='%s %f')
  </code></pre>
  
  <p>The output from the first script looks just like the input when I'm opening it with emacs or other editors. The output from the second script though defaults to utf-8 decoded characters:</p>
  
  <pre><code>??AAAAT -11.730239
  ??AAAAW -14.992939
  ??AAAAZ -14.992939
  ??AAA\304\204B -20.266239
  ??AAA\304\204D 3.007061
  ??AAA\304\204F 9.007061
  ??AAA\304\204G -13.767939
  ??AAA\304\204H -14.955439
  ??AAA\304\204K 3.007061
  ??AAA\304\204L 3.007061
  ??AAA\304\204M 3.007061
  ??AAA\304\204N 1.007061
  </code></pre>
  
  <p>I have to specifically choose utf-8 in an editor in order for them to show properly (i.e. encoded).</p>
  
  <p>How to force numpy to save a file so that it's utf-8 encoded? Is this a problem with numpy or might it be OS-specific? I'm on Ubuntu 14.04, python 2.7.6, numpy 1.8.1.</p>