Print unicode character in Python 3
<p>How can I print unicode strings within Python 3?</p>

<pre><code>myString = 'My unicode character: \ufffd'
print(myString)
</code></pre>

<p>The Output should be: "My unicode character: Ã¼"</p>

<blockquote>
  <p>File "C:\Program Files (x86)\Python35-32\lib\encodings\cp850.py", line
  19, in encode return
  codecs.charmap_encode(input,self.errors,encoding_map)[0]
  UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in
  position 22: character maps to </p>
</blockquote>

<p>I have read lots of articles about this on Stack Exchange, but non of the answers worked.</p>

<p>Please help. I am really curious how to solve this really simple looking example! Thans very much in advance!</p>

<p>It seems that you are doing this using Windows command line.</p>

<pre><code>chcp 65001
set PYTHONIOENCODING=utf-8
</code></pre>

<p>You can try to run above command first before running <code>python3</code>. It will set the console encoder to utf-8 that can represent your data.</p>

python unicode