On Tue, 25 Oct 2011 20:42:25 -0500, Shmuel Metz (Seymour J.)  wrote:
>
>>Were it my choice, I'd define a new code page with LF at 0x15 and NEL
>>at 0x25 to validate the OEMVS311 translation table.
>
>That would cause problems for data where LF really means LF and CR
>really means CR. Whether any such are still in use I don't know.
> 
What's "really" LF?  0x0A?  0x25?  0x15?  And in what data do each of
these cause problems or not cause problems?  Device drivers should
be aware of the code page of the data, and take suitable action on
embedded control codes.

I did some experimenting.  On Ubuntu Linux:

501 $ uname -a
Linux Linux-Mac 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 
i686 i686 i386 GNU/Linux
502 $
502 $ printf '\x0A' | iconv -f iso8859-1 -t ibm-1047  | od -x
0000000 0025

Which is obviously correct according to the definitions of the
respective code pages.


On z/OS:

user@MVS.:128$ uname -a
OS/390 MVS3 22.00 03 2066
user@3MVS.:129$
user@3MVS.:129$ printf '\x0A' | iconv -f iso8859-1 -t ibm-104>
0000000000      1500

This is equally obviously incorrect. This causes problems, reported
in these fora, when programmers transfer text files in binary and
rely on iconv(1) to perform the conversion.  They get different
results according to whether the conversion is performed on the
Linux platform or on z/OS.

I grant that the existing behavior on z/OS must be preserved for
compatibility with existing code.  But there's still a way out:

Define a new code page (perhaps IBM-1047-X) with NEL at 0x25 and
LF at 0x15; otherwise identical to IBM-1047.  Replace mention of
IBM-1047 with IBM-1047-X in documentation where appropriate (i.e.
nearly everywhere).  Register IBM-1047-X with ICANN (or suitable
standards organization).  Deprecate use of "IBM-1047" for reasons
of ambiguity.

Honesty is the best policy,
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to