Character reading from file in Python
Ref: http://docs.python.org/howto/unicode Reading Unicode from a file is therefore simple: import codecs with codecs.open(‘unicode.rst’, encoding=’utf-8′) as f: for line in f: print repr(line) It’s also possible to open files in update mode, allowing both reading and writing: with codecs.open(‘test’, encoding=’utf-8′, mode=”w+”) as f: f.write(u’\u4500 blah blah blah\n’) f.seek(0) print repr(f.readline()[:1]) EDIT: I’m assuming that your … Read more