main
main copied to clipboard
Encoding parsing doesn't give good error message for invalid encoding
# -*- coding: nonsense -*-
print "Testing..."
Traceback (most recent call last):
File mscorlib, line unknown, in .ctor
File mscorlib, line unknown, in .ctor
TypeError: Value cannot be null.
Parameter name: encoding
Work Item Details
Original CodePlex Issue: Issue 1019 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 17, 2006 at 5:38 PM Updated on: Feb 22, 2013 at 2:17 AM Updated by: jdhardy Test: test_codecs.py (test_cp1019) Thanks: Snaury
On 2007-11-01 04:48:22 UTC, sborde commented:
Its a negative scenario
On 2009-05-22 10:29:03 UTC, unknown user commented:
We now report "unknown encoding type"
On 2009-10-30 04:02:21 UTC, dfugate commented:
Not fixed. The correct error message is "SyntaxError: encoding problem: with BOM".
On 2009-10-30 04:05:28 UTC, dfugate commented:
No dev added test and not fixed.
Current output is this:
SyntaxError: encoding problem: nonsense
There is a different error message printed out on CPy 2.7
SyntaxError: encoding problem: nonsense
This issue was moved to IronLanguages/ironpython2#183