Closed GoogleCodeExporter closed 9 years ago
Confirmed this bug, and have a fix:
in plugins/parsers/notation3.py, line 910 and following:
if not isinstance(octets, unicode):
str = octets.decode('utf-8')
# NB Already decoded,so \ufeff
if str[0] == codecs.BOM_UTF8.decode('utf-8'):
str = str[1:]
else:
str=octets
And import codecs at the top.
After this change, the test file submitted by rvesse above works:
f = file('ttl-with-bom.ttl')
bom = StringIO(f.read())
f.close()
bomg= ConjunctiveGraph()
bomg.parse(bom, format='n3')
Original comment by azarot...@gmail.com
on 5 Jan 2011 at 4:10
Original comment by ed.summers
on 5 Jan 2011 at 5:27
This issue was closed by revision r1900.
Original comment by ed.summers
on 5 Jan 2011 at 5:49
This issue was closed by revision a83de1008e93.
Original comment by ed.summers
on 30 Mar 2011 at 9:07
Original issue reported on code.google.com by
rve...@gmail.com
on 4 Jan 2011 at 1:31Attachments: