Use codecs open in DumpFile (properly fix #260)