mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Force utf-8 instead of ascii in psn-account-id.py #103
This commit is contained in:
parent
babf275c5b
commit
e368a82e8f
1 changed files with 5 additions and 0 deletions
|
@ -6,6 +6,11 @@ if sys.version_info < (3, 0, 0):
|
|||
print("DO NOT use Python 2.\nEVER.\nhttps://pythonclock.org")
|
||||
exit(1)
|
||||
|
||||
if sys.stdout.encoding.lower() == "ascii":
|
||||
import codecs
|
||||
sys.stdout = codecs.getwriter('utf-8')(sys.stdout.buffer)
|
||||
sys.stderr = codecs.getwriter('utf-8')(sys.stderr.buffer)
|
||||
|
||||
try:
|
||||
import requests
|
||||
except ImportError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue