Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#5712 closed (fixed)

debug.py fails if python source contains wrong encoded strings

Reported by: Thomas Güttler <hv@…> Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

views/debug.py fails if the python source file contains broken characters.

  1. There is no encoding magic line (-*- coding: iso-8859-1 -*-)
  1. or the line is there, but there are nevertheless characeters of a different encoding.

The small patch defaults to ascii encoding, giving the unicode method the "replace" argument.

Attachments (2)

unicode-exception.txt (2.9 KB ) - added by Thomas Güttler <hv@…> 17 years ago.
views_debug_replace_invalid_chars.diff (834 bytes ) - added by Thomas Güttler <hv@…> 17 years ago.

Download all attachments as: .zip

Change History (5)

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

Attachment: unicode-exception.txt added

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

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

Cc: hv@… added

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [6585]) Fixed #5712 -- Added more robustness to source code display in the debug view. Our behaviour is a bit more PEP 263 compliant now, too. Thanks, Thomas Güttler.

comment:3 by Thomas Güttler <hv@…>, 16 years ago

Cc: hv@… removed
Note: See TracTickets for help on using tickets.
Back to Top