Closed Bug 1453358 Opened 8 years ago Closed 8 years ago

Traceback when parsing a file with broken encoding in Python 3

Categories

(Localization Infrastructure and Tools :: compare-locales, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: flod, Assigned: flod)

Details

Attachments

(1 file)

File "/Users/flodolo/github/tmx_maker/compare-locales/compare_locales/parser.py", line 261, in readFile self.readUnicode(f.read()) File "/Users/flodolo/github/tmx_maker/python-venv3/bin/../lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 15: invalid continuation byte Fix is easy.
Comment on attachment 8967025 [details] Bug 1453358 - Catch exception when reading file with broken encoding in Python 3, https://reviewboard.mozilla.org/r/235696/#review241468
Attachment #8967025 - Flags: review?(l10n) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: