title: Python - 'ascii' codec can't decode byte
body: <p>I'm really confused. I tried to encode but the error said <code>can't decode...</code>. </p>
  
  <pre><code>&gt;&gt;&gt; "你好".encode("utf8")
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
  </code></pre>
  
  <p>I know how to avoid the error with "u" prefix on the string. I'm just wondering why the error is "can't decode" when encode was called.  What is Python doing under the hood?</p>