Bugs item #772176, was opened at 2003-07-16 11:24 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=772176&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Interpreter Core >Group: 3rd Party >Status: Closed >Resolution: Wont Fix Priority: 5 Submitted By: Gregory Eckersley (daddio_2) Assigned to: Nobody/Anonymous (nobody) Summary: digraphs on komment lines / xlib Initial Comment: Python 2.3 falls over if it encounters non-ascii characters on comment lines. These occur with digraphs and non English names. e.g. This simple program #!/usr/bin/python print 'This program does nothing' # Aber eine Kommentarzeile l�uft nicht! # The " � " causes trouble # This causes Xlib to stop working causes the following output sys:1: DeprecationWarning: Non-ASCII character '\xe4' in file /nglob/g/bat/digraph.py on line 6, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details This program does nothing Some libraries (such as python-xlib 2.2 ) cause this problem. The line parser ought ignore all comment content whether ascii or not. ---------------------------------------------------------------------- >Comment By: Reinhold Birkenfeld (birkenfeld) Date: 2005-05-31 13:41 Message: Logged In: YES user_id=1188172 This should already have been closed. As it is related to python-xlib, marking as "3rd Party". ---------------------------------------------------------------------- Comment By: Gregory Eckersley (daddio_2) Date: 2003-07-21 02:37 Message: Logged In: YES user_id=823572 I understand & agree with your comments. I did not include the exact version since it , as you say, seems to be an undesirable (in this case) consequence of the PEP. Please consider this bug report closed, and I'll follow it up in the short term with xlib, and in the longer term with the PEP after looking at whether there is a simple and systematic way of handling this. ---------------------------------------------------------------------- Comment By: Terry J. Reedy (tjreedy) Date: 2003-07-20 22:46 Message: Logged In: YES user_id=593130 1. Python 2.3 has not been released yet. Please indicate exact versions on bug reports. Including the system and OS often helps too. 2. The reported behavior is intentional and not a bug. See Reference Manual 2. Lexical analysis: "Python uses the 7-bit ASCII character set" and the referenced PEP 0263. Please close this report. 3. If a standard library module were to generate this warning, that would be a bug that should be reported here. If a third-party library does so, get a version updated for 2.3 or request that the authors make one. 4. If you want to discuss intended behavior, post to comp.lang.python. While your request about ignoring comments is superficially reasonable, the PEP seems to indicate that encoding is dealt with, and the warning issued, *before* any actual parsing, which is to say, before the parser knows what is a comment and what is not. Detecting comments is not trivial since '#' within a string does not start a comment. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=772176&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com