问题
With Python 3.8.3 on Windows 10, my terminal, Set with a nerdfont that has icons, shows the thumbs up icon for:
import os, sys # For the following attempts
print('\uf164')
I also get a thumbs up via:
sys.stdout.write('\uf164')
However, for:
os.write(1, '\uf164'.encode('utf8'))
I get 3 characters, one for each encoded byte.
How do I print the thumbs up using os.write
?
来源:https://stackoverflow.com/questions/62502211/printing-a-font-icon-with-os-write