UnicodeDecode error checking a UTF8 page

Bug #921063 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pocket-lint
Fix Released
High
Curtis Hovey

Bug Description

I see an error when editing a html page that has a meta tag that states it is UTF-8. The checker appears to be working in that I am seeing XML syntax errors being reported.

Traceback (most recent call last):
  File "/home/curtis/.local/share/gedit/plugins/gdpformat.py", line 163, in on_document_saved
    self.controller.check_style(None, None, True)
  File "/home/curtis/.local/share/gedit/plugins/gdp/format.py", line 321, in check_style
    self._check_style(document)
  File "/home/curtis/.local/share/gedit/plugins/gdp/format.py", line 313, in _check_style
    checker.check()
  File "/usr/lib/pymodules/python2.7/pocketlint/formatcheck.py", line 267, in check
    XMLChecker(self.file_path, self.text, self._reporter).check()
  File "/usr/lib/pymodules/python2.7/pocketlint/formatcheck.py", line 366, in check
    ElementTree.parse(StringIO(text), parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1183, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1641, in feed
    self._parser.Parse(data, 0)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1544, in _start_list
    return self.target.start(tag, attrib)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1419, in start
    self._flush()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1392, in _flush
    text = "".join(self._data)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)

Curtis Hovey (sinzui)
Changed in pocket-lint:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in pocket-lint:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.