if sys.stdout.encoding is None or sys.stdout.encoding == 'ANSI_X3.4-1968':
    utf8_writer = codecs.getwriter('UTF-8')
if sys.version_info.major < 3:
    sys.stdout = utf8_writer(sys.stdout, errors='replace')
else:
    sys.stdout = utf8_writer(sys.stdout.buffer, errors='replace')
print('\u2603')
Print unicode string in python regardless of environment