[Patches] [ python-Patches-557946 ] Ebcdic compliancy in stringobject source

noreply@sourceforge.net noreply@sourceforge.net
Thu, 23 May 2002 01:38:00 -0700


Patches item #557946, was opened at 2002-05-19 14:20
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=557946&group_id=5470

Category: Core (C code)
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Jean-Yves MENGANT (jymen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Ebcdic compliancy in stringobject source

Initial Comment:
the printable character set test made inside
strincgobject.c is not compliant with EBCDIC
systems(OS390 or OS400)

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

>Comment By: Jean-Yves MENGANT (jymen)
Date: 2002-05-23 08:38

Message:
Logged In: YES 
user_id=513881

when porting to OS390(EBCDIC os) , the only place I found  
a bad ASCII asumption which leeds to further python's 
startup interpreter troubles is the one pointed here. When I 
fixed it I have been able to use the python interpreter kernel 
without troubles.Some modules like xmllib may make some 
ascii asumption but modules portability is a different story 
since those modules may be declared non EBCDIC 
compliant.

On the second topic using a C library function I am 100% ok 
the only question is that I am persuaded that using for 
instance the isascii XPG C function will generate more 
complex and slower code when trying to keep it in 
compliancy both with EBCDIC/ASCII targets. Having a more 
generic #define like :
#define EBCDIC inside the config.h set by ./configure when 
platform is EBCDIC is IMO the best compromise here.

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

Comment By: Martin v. Löwis (loewis)
Date: 2002-05-22 17:09

Message:
Logged In: YES 
user_id=21627

Is it really worth fixing this? Python assumes that the
character set of byte strings is an ASCII superset in many
places. If there is any change made here, it should be based
on C library functions, rather than on static knowledge of
the operating system.

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

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