[issue6543] traceback presented in wrong encoding

2010-06-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Update and improve the patch: - Update the patch to py3k (replace tabs by spaces) - check if _PyUnicode_AsString() result is NULL - _Py_FindSourceFile() returns the file instead of NULL on success! - use directly utf-8 instead of

[issue6543] traceback presented in wrong encoding

2010-06-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I tested the last patch on Windows: it does fix the bug, the traceback is displayed correctly in my terminal charset (cp850). I commited the fix to Python 3.1 (r82063) and 3.2 (r82059+r82061). -- resolution: - fixed

[issue6543] traceback presented in wrong encoding

2010-06-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In issue3343, we chose to mark this function as private. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543 ___

[issue6543] traceback presented in wrong encoding

2010-06-14 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch changes the prototype of _Py_DisplaySourceLine() function. Is it possible that a third party module uses this function? Should we keep backward compatibility with third pary modules using the private C API? --

[issue6543] traceback presented in wrong encoding

2010-03-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: surrogateescape characters are not printable stderr uses backslashescape error handler, and so non-decodable characters will be displayed as \xHH. ... see also #8092 :-) -- ___ Python

[issue6543] traceback presented in wrong encoding

2010-03-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Storing unicode in c_filename would not solve the problem: surrogateescape characters are not printable. There is no need to support non-decodable filenames in the import mechanism. -- ___

[issue6543] traceback presented in wrong encoding

2010-03-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: in compile.c, the c_filename member has utf8 encoding The problem is maybe that c_filename should be an unicode object created using the file system default encoding and the surrogateescape error handler, to be able to store

[issue6543] traceback presented in wrong encoding

2010-03-22 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543 ___

[issue6543] traceback presented in wrong encoding

2010-03-21 Thread Sean Reifschneider
Sean Reifschneider j...@tummy.com added the comment: From a cursory glance, I don't see any problems with this patch. Though I admit that I don't know the traceback code nearly as well as you, Amaury. The tests pass on py3k trunk on my Linux box. If you want other review, perhaps ask on

[issue6543] traceback presented in wrong encoding

2010-03-21 Thread Sean Reifschneider
Changes by Sean Reifschneider j...@tummy.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543 ___ ___ Python-bugs-list

[issue6543] traceback presented in wrong encoding

2009-07-22 Thread Fan Decheng
New submission from Fan Decheng fandech...@gmail.com: traceback information is wrongly encoded. Steps to reproduce: 1. Use a version of Windows that supports CP936 (Simplified Chinese) as the default encoding. 2. Create a directory containing Chinese characters. Such as C:\测试 3. In the

[issue6543] traceback presented in wrong encoding

2009-07-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This also happens on a Western Windows (cp437, mbcs==cp1252) with a filename like café.py. The attached patch corrects three problems: - in compile.c, the c_filename member has utf8 encoding, and must not be decoded with

[issue6543] traceback presented in wrong encoding

2009-07-22 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6543 ___ ___