title: python "print" doesn't work after sys.setdefaultencoding('utf-8')
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3578685/how-to-display-utf-8-in-windows-console">How to display utf-8 in windows console</a>  </p>
  </blockquote>
  
  
  
  <p>python "print" statement doesn't work.</p>
  
  <p>To avoid this error, </p>
  
  <blockquote>
    <p>'ascii' codec can't decode byte 0xec in position 0: ordinal not in range(128)</p>
  </blockquote>
  
  <p>I put a few statements in my code as below</p>
  
  <pre><code>import sys
  
  reload(sys)
  
  sys.setdefaultencoding('utf-8')
  </code></pre>
  
  <p>before the code, "print" works well. However, after the code, "print" doesn't work.</p>
  
  <pre><code>print "A"
  
  import sys
  
  reload(sys)
  
  sys.setdefaultencoding('utf-8')
  
  print "B"
  </code></pre>
  
  <p>Here, only "A" printed on my computer, Python2.7.3 (64bit) for Windows. Python2.7 IDLE</p>
  
  <p>I need help</p>