# -*- coding: utf-8 -*- print "ÆØÅ"
When running the above script in Windows 7 with python 2.7.3 using cmd
, powershell
or cygwin
, I get this output:
ÆØÅ
The file is a UTF-8 file and works fine in my text editor. How can I make it print "ÆØÅ"?
Bit late to the party here, try
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
print "ÆØÅ"
You can force unicode when printing:
print u'ÆØÅ'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With