python格式和显示非ASCII字符

python格式和显示非ASCII字符,python,unicode,utf-8,Python,Unicode,Utf 8,我正在尝试打印(符号,但似乎无法使用format()方法进行打印。我正在尝试以下操作: curr_prefix = u"\xA3" print "{}".format(curr_prefix) 但我得到了以下错误: UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128) 请尝试print u“{}”。format(curr\u prefi

我正在尝试打印
符号,但似乎无法使用format()方法进行打印。我正在尝试以下操作:

curr_prefix = u"\xA3"
print "{}".format(curr_prefix)
但我得到了以下错误:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128)

请尝试
print u“{}”。format(curr\u prefix)

这是关于在Python中打印Unicode的大量其他问题的重复。读它们。