R
Richy2004
I've experienced problems when trying to load a text file encoded with
2byte unicode characters. No matter what combination of the following
I try, I always get an error when
executing file.readline()
file = open("file.txt", "r")
file = open("file.txt", "rb")
file = codecs.open("file.txt", "rb", "utf-16")
file = unicode(open("file.txt", "r"), "utf-16")
Even more strangely it does work when used in the interactive
interpreter.
Any ideas?
Thanks,
Richard
2byte unicode characters. No matter what combination of the following
I try, I always get an error when
executing file.readline()
file = open("file.txt", "r")
file = open("file.txt", "rb")
file = codecs.open("file.txt", "rb", "utf-16")
file = unicode(open("file.txt", "r"), "utf-16")
Even more strangely it does work when used in the interactive
interpreter.
Any ideas?
Thanks,
Richard