I am trying to write a file in .fits format, which as best I can tell requires utf encoding, preferably utf-8. How do I write a an integer to a file in utf-8?
Asked
Active
Viewed 242 times
1 Answers
1
How to encode a string in utf8 for std out:
myString = "string"
string.encode('utf8')
A python post by Jon Skeet on how to write to a file with utf8:
import codecs
file = codecs.open("lol", "w", "utf-8")
file.write(u'\ufeff')
file.close()