The line # coding=utf-8
only helps to write unicode literal and is no use for plain byte strings. Anyway assuming that your Python file is UTF-8 encoded, the line str = str.decode('utf-8')
gives you a correct unicode string.
But as said by Ansgar Wiechers, as you declare your encoding the simpler way would be to directly use a unicode litteral:
str = u"35 μg/m3"
Simply, Windows console has poor support for UTF8. Common encodings are win1252 (a latin1 variant), or cp850 a native OEM font. Unless you want to explicitely deal with the explicit encoding, your best bet is to directly display the unicode string:
#!/usr/bin/python
# coding=utf-8
str ="35 μg/m3"
str = str.decode('utf-8') # str is now an unicode string
print(str)
If you want to explicitely use latin1, and provided you use a TrueType font such as Lucida Console or Consolas, you can do:
chcp 1252
python .\encoding.py
with
#!/usr/bin/python
# coding=utf-8
str ="35 μg/m3"
str = str.decode('utf-8') # str is now an unicode string
str = str.encode('latin1') # str is now an latin1 encoded byte string
print(str)