develooper Front page | perl.perl5.porters | Postings from September 2011

Re: Speak up now about your use of EBCDIC or WE WILL REMOVE IT in afuture release of Perl

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
September 27, 2011 08:47
Subject:
Re: Speak up now about your use of EBCDIC or WE WILL REMOVE IT in afuture release of Perl
Message ID:
20110927154724.GL23881@plum.flirble.org
On Tue, Sep 27, 2011 at 10:32:24AM -0500, David Nicol wrote:
> > Part of the problem is that no one even knows if it works. It is
> > almost certain to be broken given various changes, and no one knows
> > how much work it would be to fix it, nor can anyone test those fixes.
> >
> > Leon
> 
> I think I triggered this outpouring by pointing out that an example in
> the documentation for a pack format presumed ASCII. EBCDIC is pretty
> much the only non-ASCII game in town, but it would not be impossible
> to make up an alternate encoding just to test abstracting of encoding,
> but that idea of course fails the Sufficient Intrinsic Amusement test
> and therefore is a non-hunting dog. Or, to define utf8 (with it's

I think that it's actually harder than that. I had considered whether it
would be worthwhile to try building with -DEBCDIC on *nix, but I know
there are games in the source such as:

#if 'I' == 73 && 'J' == 74
/* On an ASCII/ISO kind of system */
#define ISUUCHAR(ch)    ((ch) >= ' ' && (ch) < 'a')
#else

and

#if 'J'-'I' == 1
/* ASCII */


(along with other assumptions about code points in the source code character
set) that this wouldn't be complete test of compiling. Hence I'm not sure if
it would even be that useful.

> ASCII subset) as How It Is and declare that any compatibility porting
> is to be done at the perimeter instead of inside.

This is what Python seems to have done:

http://bugs.python.org/issue1298

[thanks to Léon for finding that]

note particularly Guido's comments about the cost, maintainability, and
who bears it, such as http://bugs.python.org/issue1298#msg56553

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About