title: Python 'ascii' codec can't encode character error
body: <p>I was trying to read utf-16 file. This code is working fine on local machine but when I ran it on AWS Batch service then it's giving above error.</p>
  
  <pre><code>import codecs
  file_to_split = codecs.open("file_utf_16.txt", 'r+', "UTF-16")
  </code></pre>
  
  <p>It throws an exception <code>header 'ascii' codec can't encode character '\ufeff' in position 0: ordinal not in range(128)</code></p>
  
  <p>I am using Python 3.6. </p>