Opened 17 years ago

Closed 17 years ago

#4249 closed (fixed)

[unicode] views/debug.py did not read encoding (# -*- coding: iso-8859-1 -*-)

Reported by: Thomas Güttler <hv@…> Owned by: Malcolm Tredinnick
Component: Uncategorized Version: other branch
Severity: Keywords: unicode PEP0263
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

here is a small patch. views/debug.py failed to display the
traceback because the file was encoded in latin1.

I patched _get_lines_from_file() to read the encoding string of the
python file.

See: http://www.python.org/dev/peps/pep-0263/

Attachments (1)

views_debug_py.diff (757 bytes ) - added by Thomas Güttler <hv@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

by Thomas Güttler <hv@…>, 17 years ago

Attachment: views_debug_py.diff added

comment:1 by Malcolm Tredinnick, 17 years ago

Owner: changed from Jacob to Malcolm Tredinnick
Summary: Unicode branch: views/debug.py did not read encoding (# -*- coding: iso-8859-1 -*-)[unicode] views/debug.py did not read encoding (# -*- coding: iso-8859-1 -*-)
Triage Stage: UnreviewedAccepted

Looks like the right idea. I still have to audit that part of the tree for unicode problems, but this patch looks like a fix for the problem you are seeing. I'll apply it when I get to that part.

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5193]) unicode: Fixed #4249 -- Decode source files correctly in the debug view.
Thanks, Thomas G?\195?\188ttler.

Note: See TracTickets for help on using tickets.
Back to Top