[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: The original issue is now fixed in r61462. Please open another issue for the case of regular exceptions. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: >I'm now invesigating this problem. This comes from another reason. Of course, even if this line number problem is fixed, encoding problem still remains. Probably I'll look at it next. __ Tracker <[EMAIL PRO

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: >However, I also fail to reproduce the problem on OSX. I get > > File "a.py", line 3 >print "�N" > ^ >SyntaxError: invalid syntax Umm, strange... I can output correct result even if using euc_jp (my terminal named command

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: > I was confusing it with a regular exception, e.g. > print("年",a) I'm now invesigating this problem. This comes from another reason. Please look at fp_setreadl in Parser/tokenizer.c. This function opens file using codec and doesn't seek t

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: You are probably right about the source of the problem; I was confusing it with a regular exception, e.g. print("年",a) However, I also fail to reproduce the problem on OSX. I get File "a.py", line 3 print "�N" ^ SyntaxE

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-17 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: Hello. I tracked down source code and found where err->text is set. Index: Parser/parsetok.c === --- Parser/parsetok.c (revision 61411) +++ Parser/parsetok.c (working copy

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-16 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: This will involve quite some work to fix. When fetching the code, the source encoding must be recognized. Contributions are welcome. (I personally consider this issue minor, as I would encourage users to use UTF-8 as the source encoding, an

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-16 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: Probably same problem exists in PyErr_ProgramText(). __ Tracker <[EMAIL PROTECTED]> __ ___ Pytho

[issue2301] [Py3k] No text shown when SyntaxError (when not UTF8)

2008-03-16 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>: -- title: [Py3k] -> [Py3k] No text shown when SyntaxError (when not UTF8) __ Tracker <[EMAIL PROTECTED]> __ __