title: Enforcing Python source encoding as UTF-8
body: <p>I currently put this at the top of all my .py files:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  </code></pre>
  
  <p>I've been taught this for years as best practice. To me the idea of enforcing UTF-8 by default makes sense, especially with my tests containing a lot of Unicode characters. It allows me to write Unicode literals in my code directly.</p>
  
  <p>However, I recently was told that forcing the source encoding to UTF-8 can be bad for cross-platform compatibility, since Windows doesn't default to UTF-8. I believe it's not just an issue with code editors, but more of an issue with treating Unicode the same everywhere. But I don't fully understand the issue.</p>
  
  <p>Both approaches seem to have strong arguments. In more detail, what are the benefits of enforcing/not enforcing a source encoding? What are the problems?</p>