This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Compile error messages and PEP-263
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Use correct encoding for printing SyntaxErrors
View: 1031213
Assigned To: nnorwitz Nosy List: georg.brandl, ishimoto, nnorwitz
Priority: normal Keywords:

Created on 2003-07-31 09:11 by ishimoto, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (5)
msg17517 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2003-07-31 09:11
If a source file contains encoding definition and it has 
syntax errors,
Python prints line of source file in utf-8.
Here's simple example.

# -*- coding: Shift_JIS -*-
print "XXXXX" abcdefg  # "XXXXX" is Japanese ShiftJIS 
string.

With this source file, Python prints a second line as a 
part of error
message in utf-8 encoding. Lines printed here should be 
reconverted into
original encoding. Also, error column that '^' character 
marks is wrong.
msg17518 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2004-10-01 04:19
Logged In: YES 
user_id=463672

I filed a patch for this bug.
http://sourceforge.net/tracker/?
func=detail&aid=1031213&group_id=5470&atid=305470

Any chance this bug to be fixed in Python 2.4? 
msg17519 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-02 05:44
Logged In: YES 
user_id=33168

I'm hoping that someone more familiar with unicode could
take a look at this.  The patch looks ok to me, but I don't
know how to test that it works.  I'm inclined to accept it,
unless I hear otherwise.
msg17520 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-02 05:46
Logged In: YES 
user_id=33168

By "it" I meant the patch which is where I intended to make
the previous comment.
msg55228 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 21:52
#1031213 contains a patch, marking as superseder.
History
Date User Action Args
2022-04-10 16:10:24adminsetgithub: 38983
2007-08-23 21:52:01georg.brandlsetstatus: open -> closed
resolution: duplicate
superseder: Use correct encoding for printing SyntaxErrors
messages: + msg55228
nosy: + georg.brandl
2003-07-31 09:11:29ishimotocreate