Title: Compile error messages and PEP-263
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
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 2007-08-23 21:52 by georg.brandl. 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 

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 

I filed a patch for this bug.

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 

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 

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.
Date User Action Args
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