[Python-bugs-list] [ python-Bugs-566302 ] Bgen should generate 7-bit-clean code

noreply@sourceforge.net noreply@sourceforge.net
Sun, 09 Jun 2002 02:09:08 -0700


Bugs item #566302, was opened at 2002-06-08 23:50
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=566302&group_id=5470

Category: Macintosh
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Jack Jansen (jackjansen)
Summary: Bgen should generate 7-bit-clean code

Initial Comment:
Bgen should generate 7-bit clean code by using hex escapes for non-ascii characters. This should circumvene the problem with MacRoman vs. Latin-1 conversion for files under CVS. The bad news is that this means bgen may need to parse the constant declarations, but maybe we can get away by just escaping all non-ascii chars (as they should only occur within either strings or comments in C header files anyway).

The same probably holds for gensuitemodule.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-06-09 11:09

Message:
Logged In: YES 
user_id=21627

I think I understand the issue of using 7-bit clean source
code. I'm still trying to understand the bgen issue: why
would it ever produce output that is not 7-bit-clean?
(again, with examples please).

I would assume that the input is already in error, in such a
case.

----------------------------------------------------------------------

Comment By: Just van Rossum (jvr)
Date: 2002-06-09 10:32

Message:
Logged In: YES 
user_id=92689

It's not a question of "doesn't work" but more a question of brittleness: 
Mac CVS clients optionally do text file encoding conversion, but this 
means that everyone involved _have_ to use the same settings or things 
go wrong. It helps to keep source files 7-bit clean. Some .py files in the 
Mac subdirectory are currently not 7-bit clean, and some of these are 
generated by bgen. Hence this "bug".

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-06-09 10:23

Message:
Logged In: YES 
user_id=21627

Can you give an example of code where it doesn't work
properly in this respect?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=566302&group_id=5470