Created
October 1, 2013 08:38
-
-
Save aaronsaunders/6775512 to your computer and use it in GitHub Desktop.
>print data_list
'\xef\xbb\xbfsome_data1' source: http://stackoverflow.com/questions/18664712/split-function-add-xef-xbb-xbf-n-to-my-list UTF-8 BOM in the beginning. To get rid of it, first decode your file contents to unicode.
This file contains 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
fp = open("file.txt") | |
data = fp.read().decode("utf-8-sig").encode("utf-8") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment