0

I'm attempting to write a program where the code reads from a pre-existing text file, and then writes the text in that file as utf-8 in a new text file. How would I go about doing this? My apologies I am extremely new to python and I'm unaware of any modules that could help accomplish this task.

Student
  • 39
  • 1
  • 11

1 Answers1

1

You could check out this question asked previously: How to convert a file to utf-8 in Python?

But to summarize you should see the codecs library and particularly codecs.open() which allows specification of a file type.

Community
  • 1
  • 1
Jeremy
  • 1,894
  • 2
  • 13
  • 22