Opened 8 years ago

Closed 8 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: mtredinnick
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: UI/UX:

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@…> 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Thomas Güttler <hv@…>

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to mtredinnick
  • Patch needs improvement unset
  • Summary changed from Unicode branch: views/debug.py did not read encoding (# -*- coding: iso-8859-1 -*-) to [unicode] views/debug.py did not read encoding (# -*- coding: iso-8859-1 -*-)
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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