[Python-bugs-list] [ python-Bugs-590888 ] off-by-one error in encoding warning
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 04 Aug 2002 15:16:12 -0700
Bugs item #590888, was opened at 2002-08-04 17:16
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=590888&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Martin v. Löwis (loewis)
Summary: off-by-one error in encoding warning
Initial Comment:
There seems to be an off-by-one error in the line number reported by
the new encoding warnings. Consider this simple file (three lines):
if __name__ == "__main__":
x = "Bennett,Scott (guitar)" == "Scott Bennett"
x = u"Andrč Previn" == "Andrč Previn"
If I import this into the current CVS Python, I get this warning:
>>> import dummy
dummy.py:2: DeprecationWarning: Non-ASCII character '\xe8', but
no declared encoding
x = "Bennett,Scott (guitar)" == "Scott Bennett"
It should be reporting and displaying line 3, not line 2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=590888&group_id=5470