how to let print() function can print unicode

when not add this code 'sys.stdout = io.TextIOWrapper(sys.stdout.buffer,
errors = 'replace', line_buffering = True)',there is a
error:UnicodeEncodeError: 'gbk' codec can't encode character '\xb2' in
position 2: illegal multibyte sequence.