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
|
Hi,
views/debug.py fails if the python source file contains broken characters.
- There is no encoding magic line (-*- coding: iso-8859-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.
(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.