title: Python default string encoding
body: <p>When, where and how does Python implicitly apply encodings to strings or does implicit transcodings (conversions)?</p>
  <p>And what are those &quot;default&quot; (i.e., implied) encodings?</p>
  <p>For example, what are the encodings:</p>
  <ul>
  <li><p>of string literals?</p>
  <pre><code>  s = &quot;Byte string with national characters&quot;
    us = u&quot;Unicode string with national characters&quot;
  </code></pre>
  </li>
  <li><p>of byte strings when type-converted to and from Unicode?</p>
  <pre><code>  data = unicode(random_byte_string)
  </code></pre>
  </li>
  <li><p>when byte- and Unicode strings are written to/from a file or a terminal?</p>
  <pre><code>  print(open(&quot;The full text of War and Peace.txt&quot;).read())
  </code></pre>
  </li>
  </ul>