在Python 3 編碼sys.stdout
問題:
問題:sys.stdout.reconfigure(encoding='utf-8') sys.stdout.reconfigure(encoding='utf-8', errors='ignore') # Ignore encoding errors透過利用reconfigure(),您可以有效地將標準輸出的編碼更改為UTF-8 或任何其他Python 支援的編碼。
以上是如何在Python 3中設定預設輸出編碼?的詳細內容。更多資訊請關注PHP中文網其他相關文章!