Front page | perl.mvs |
Postings from April 2010
Re: Quick Perl 5 question on EBCDIC
Thread Next
From:
Peter Prymmer
Date:
April 5, 2010 08:33
Subject:
Re: Quick Perl 5 question on EBCDIC
Message ID:
OF40723323.38487373-ON852576FC.00543A08-852576FC.00555AEF@factset.com
Thanks for the note Jarkko.
I have not had access to an EBCDIC machine in a long while, but I do
remember
some bits of it. Specifically about the "\cCHAR" form of escapes
I recall having written the t/op/chars.t test to see if character escapes
work - and
they did on the OS/390 system I was working on. The fact that \cH maps to
character
code 8 (not \007) means that you as a programmer had better know what that
character is used for on an EBCDIC system (there is no one single
specification for
EBCDIC, there are several alternate code pages possible).
Karl Williamson wrote:
>> I'm
>> trying to write platform-neutral pods talking about control characters,
so I
>> thought the \c form would do it.
They do not, instead they map to ascii-ish ord values as show in
t/op/chars.t
I hope that helps.
Peter Prymmer
From:
Jarkko Hietaniemi <jhi@iki.fi>
To:
karl williamson <public@khwilliamson.com>
Cc:
Nicholas Clark <nick@ccl4.org>, Merijn Broeren <merijnb@iloquent.com>,
pprymmer@factset.com, dorner@cpan.org, neale@vma.tabnsw.com.au
Date:
04/02/2010 10:53 AM
Subject:
Re: Quick Perl 5 question on EBCDIC
Yes, we should get someone working on the EBCDIC support.
Not that it's #1 priority, but I think it shakes out several stupid
assumptions out of the code base. It used to work reasonably well,
back when I still had access to an EBCDIC system. I might be fooling
myself and thinking of the old golden glory days of 5.8 but I think we
had a passing rate of tests of very close to 100% in 5.8.0 and 5.8.1.
The late Nick Ing-Simmons started the port with his access to some
Texas Instruments mainframe, then later Merijn Broeren of Morgan
Stanley (and his back-then-boss at MS, Phil Moore) helped me to get an
account at an IBM mainframe development center (for obvious liability
reasons, MS cannot give access to their production systems) (it's
amazing what an effect an "ahem" from MS can do :-), and we got the
Unicode (UTF-EBCDIC, the pain is receding...) in pretty good shape.
Later some IBM z/OS people sent some patches to p5p but the patches
were severely faulty in many aspects: some of them could be salvaged
(and were incorporated), but most of it if had to be dropped to the
cutting room floor :-( Also other people from other even more
esoteric EBCDIC shops like VM/ESA and BS2000 helped to shake out
"ASCII assumptions". CCing some of those people in their last known
addresses.
As regards to your particular question, I think "\cX" in general is an
ASCII assumption, no point in trying to map that to EBCDIC. So 0x08.
On Mon, Mar 29, 2010 at 5:30 PM, karl williamson
<public@khwilliamson.com> wrote:
> I realized after I sent this that I (again, it seems to be a habit of
mine)
> forgot that backspace is \008 and not 7, but the same principal applies.
> EBCDIC \008 is the same as Latin1 0x97.
>
> karl williamson wrote:
>>
>> Hi Jarkko:
>>
>> Do you know what, for example, "\cH" was intended to be on an EBCDIC
>> platform?. Should it be \007, or should it be Backspace?
>>
>> FYI, I don't write you unless I've exhausted the other resources I know
>> about, including p5p archives.
>>
>> Here's why I care about the answer, skip if you don't want to know.
It's
>> clear that no one is running modern Perls on EBCDIC these days because
it's
>> obvious from reading the code that there are lots of bugs that they'd
be
>> screaming about. But we are maintaining the fiction in the
documentation
>> that it's a possibility, and who knows, it might be someday. And, I'm
>> trying to write platform-neutral pods talking about control characters,
so I
>> thought the \c form would do it. But reading the code indicates that
\cH on
>> EBCDIC is \007, whatever that might mean (DEL on the code pages that
Perl
>> currently claims to handle). But there are comments in the code that
appear
>> to contradict that, and the whole EBCDIC-specific function that
computes
>> this is unnecessary, as it could have been unified with the ASCII
platform
>> handling by simply adding the NATIVE_TO_ASCII() (and perhaps inverse)
>> macros. So it's clear to me that the authors had some confusion; hence
I
>> don't know what it's supposed to do.
>>
>> Thanks
>>
>> karl
>>
>
>
--
There is this special biologist word we use for 'stable'. It is
'dead'. -- Jack Cohen
Thread Next
-
Re: Quick Perl 5 question on EBCDIC
by Peter Prymmer