[過去ログ]
Pythonのお勉強 Part63 (1002レス)
Pythonのお勉強 Part63 http://mevius.5ch.net/test/read.cgi/tech/1582507911/
上
下
前
次
1-
新
通常表示
512バイト分割
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
889: デフォルトの名無しさん (ワッチョイ bf8c-th+2) [] 2020/09/04(金) 16:19:28.31 ID:gLEobkXD0 みなさんのコメントでそんなわけないと自分のコードを見直し pythonのデフォルトがutf-8で、コマンドプロンプトのchcpを65001にすればいい、 という思い込みがありました。 print(sys.stdin.encoding)やprint(sys.stdout.encoding)をしたらcp932のままでした。 ので、 sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8') sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') とすることで、全てがうまくいきました。 みなさん、ありがとうございました! http://mevius.5ch.net/test/read.cgi/tech/1582507911/889
メモ帳
(0/65535文字)
上
下
前
次
1-
新
書
関
写
板
覧
索
設
栞
歴
あと 113 レスあります
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.014s