don't lstrip the bom

This commit is contained in:
Damien Elmes 2011-04-18 06:06:20 +09:00
parent 3af48542e4
commit 10426b6606

View file

@ -67,7 +67,8 @@ class TextImporter(Importer):
self.dialect = None
self.fileobj = open(self.file, "rbU")
self.data = self.fileobj.read()
self.data = self.data.lstrip(codecs.BOM_UTF8)
if self.data.startswith(codecs.BOM_UTF8):
self.data = self.data[len(codecs.BOM_UTF8):]
def sub(s):
return re.sub(
"^\#.*", "", re.sub(