Created
January 13, 2017 04:19
-
-
Save ged1959/fa690c0eb5aeca09e0d1c602b5b0826f to your computer and use it in GitHub Desktop.
fileread.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
file = open('test.txt', 'r', encoding='utf-8') | |
whole_str = file.read() | |
file.close() | |
print(whole_str) | |
''' | |
最初、「ascii decoding error」が発生。 | |
以下を参考に解決! | |
http://stackoverflow.com/questions/37083687/unicodedecodeerror-ascii-codec-cant-decode-byte-0x92 | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment