Here\'s a little program:
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
print(\'abcd kΩ ☠ °C √Hz µF ü ☃ ♥\')
print(u\'abcd kΩ ☠ °C √Hz µF ü ☃ ♥\')
There are two possible reasons:
print
. You cannot output raw Unicode, so print
needs to figure out how to convert it to the byte stream expected by the console (it uses sys.stdout.encoding
AFAIK), which brings us to