Created
November 13, 2018 16:43
-
-
Save elpatron68/8ce84317e6bcea6dfc91be83b2fc9fda to your computer and use it in GitHub Desktop.
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
| # converts iso encoded text file to utf-8 | |
| import codecs | |
| def convertfromiso(iso_filename, uft8_filename): | |
| data = codecs.open(iso_filename, 'r', 'iso-8859-1').read() | |
| codecs.open(uft8_filename, 'w', 'utf-8').write(data) | |
| def main(): | |
| convertfromiso('isofile.txt', 'new-utf8-file.txt') | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment