fork(1) download
  1. def unicode_test():
  2. byte_string = '\xc3\xb4'
  3. unicode_string = unicode(byte_string, "utf-8")
  4.  
  5. print "unicode object type: {}".format(type(unicode_string))
  6. output_string = u"printed unicode object: {}".format(unicode_string)
  7. print output_string
  8.  
  9. if __name__ == '__main__':
  10. unicode_test()
Runtime error #stdin #stdout 0.09s 10840KB
stdin
Standard input is empty
stdout
unicode object type: <type 'unicode'>