Linuxで同じコードがうまく動作する理由は誰か教えてください。同じコードをエンコードしたファイルWindows、Linux
次のコードは、各OS上で実行されました:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 1: character maps to <undefined>
をしかし、Linux上ですべてがうまく働い::
Windowsのエラーで
print("Output :" + open("data.txt", "r").read())
を上げた
Output :☀♠☂
です問題?
'print(sys.getdefaultencoding())'は面白いでしょう。 – tdelaney