# -*- coding: utf-8 -*-
import sys, locale, os
print(sys.stdout.encoding)
print(sys.stdout.isatty())
print(locale.getpreferredencoding())
print(sys.getfilesystemencoding())
print(os.environ.get("PYTHONIOENCODING"))
if not 'PYTHONIOENCODING' in os.environ and not sys.stdout.encoding:
  import codecs
  sys.stdout = codecs.getwriter('utf8')(sys.stdout)
print(u'☺ ☻')

