title: Fix Python Unicode Error caused by another language
body: <p>I'm getting this error:</p>
  
  <blockquote>
    <p>UnicodeEncodeError: 'ascii' codec can't encode characters in position 52-57: ordinal not in range(128)</p>
  </blockquote>
  
  <p>The code causing the error:</p>
  
  <pre><code>f.write(textwrap.dedent(unicode(the_string))
  </code></pre>
  
  <p>The string I'm trying to write is an excerpt from a website which contains English and Japanese (for testing) Transliteration of foreign words and names, such as コンピュータ (konpyūta, "computer") and ロンドン (Rondon, "London"). (Some foreign borrowings that have become naturalized may not be rendered in katakana.) </p>
  
  <p>When handling a string in Python that is In another language (Japanese). How can I parse this to prevent the error and still retain the string?</p>