David Cole wrote:

> Complete reversibility doesn't matter. I need to reverse 
> translate only those characters mutually defined to both code 
> pages. Everything else can just go to ... well ... nulls, 
> periods, blanks, whatever.

Not having reversible tables is almost always a mistake, in my experience.
It seems like a good idea to start with (who needs that unpronounceable
scripty-looking capital B thing anyway), but it lets you down when you need
it.

One important point is to ensure that you are talking about the same
character set on both ends of the translation. The traditional EBCDIC code
pages (037, 1047, and the like) encode character set 697, which, by a
remarkable coincidence is the same CS encoded by ISO 8859-1 (Latin 1), known
by IBM as CP 819. Using CPs like 437 (DOS), or 1252 (Windows Western) leads
to trouble, because they contain characters not in any EBCDIC codepage, and
before you know it you'll add just one little character because you like the
look of it, and map it to some private codepoint in EBCDIC, and down the
road you're toast when one of them shows up on your 3270 screen.

For most purposes, for users of traditional EBCDIC and ASCII based
programming languages and of Western European human languages, I recommend
CPs 819 (ASCII) and 1047 (EBCDIC). This combination provides square bracket
positions that keep most people and programs happy, which 037 does not.

The only significant things missing from these are the Euro sign, and a very
small set of accented characters said to be required for French notably the
oe ligature. These characters are provided in CP 924, and the corresponding
ISO 8859-15. However it turns out that the translation tables are not
different, so...

> So, what are your favorite code pages? Or is that too 
> restrictive a question. Should I be asking, what are your 
> favorite translations?

These are my favourite translations:

*         From CP = 1047 To CP = 819                     
         DC    X'000102039C09867F978D8E0B0C0D0E0F'  00-0F
         DC    X'101112139D8508871819928F1C1D1E1F'  10-1F
         DC    X'80818283840A171B88898A8B8C050607'  20-2F
         DC    X'909116939495960498999A9B14159E1A'  30-3F
         DC    X'20A0E2E4E0E1E3E5E7F1A22E3C282B7C'  40-4F
         DC    X'26E9EAEBE8EDEEEFECDF21242A293B5E'  50-5F
         DC    X'2D2FC2C4C0C1C3C5C7D1A62C255F3E3F'  60-6F
         DC    X'F8C9CACBC8CDCECFCC603A2340273D22'  70-7F
         DC    X'D8616263646566676869ABBBF0FDFEB1'  80-8F
         DC    X'B06A6B6C6D6E6F707172AABAE6B8C6A4'  90-9F
         DC    X'B57E737475767778797AA1BFD05BDEAE'  A0-AF
         DC    X'ACA3A5B7A9A7B6BCBDBEDDA8AF5DB4D7'  B0-BF
         DC    X'7B414243444546474849ADF4F6F2F3F5'  C0-CF
         DC    X'7D4A4B4C4D4E4F505152B9FBFCF9FAFF'  D0-DF
         DC    X'5CF7535455565758595AB2D4D6D2D3D5'  E0-EF
         DC    X'30313233343536373839B3DBDCD9DA9F'  F0-FF

*         From CP = 819 To CP = 1047                     
         DC    X'00010203372D2E2F1605250B0C0D0E0F'  00-0F
         DC    X'101112133C3D322618193F271C1D1E1F'  10-1F
         DC    X'405A7F7B5B6C507D4D5D5C4E6B604B61'  20-2F
         DC    X'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'  30-3F
         DC    X'7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'  40-4F
         DC    X'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'  50-5F
         DC    X'79818283848586878889919293949596'  60-6F
         DC    X'979899A2A3A4A5A6A7A8A9C04FD0A107'  70-7F
         DC    X'202122232415061728292A2B2C090A1B'  80-8F
         DC    X'30311A333435360838393A3B04143EFF'  90-9F
         DC    X'41AA4AB19FB26AB5BBB49A8AB0CAAFBC'  A0-AF
         DC    X'908FEAFABEA0B6B39DDA9B8BB7B8B9AB'  B0-BF
         DC    X'6465626663679E687471727378757677'  C0-CF
         DC    X'AC69EDEEEBEFECBF80FDFEFBFCBAAE59'  D0-DF
         DC    X'4445424643479C485451525358555657'  E0-EF
         DC    X'8C49CDCECBCFCCE170DDDEDBDC8D8EDF'  F0-FF

These were generated, btw, by a trivial Rexx program that reads the (binary)
tables provided by IBM in publication SC09-2190 Character Data
Representation Architecture Reference and Registry, and writes them out in
Asm, C, and various other formats. Of course you can use the tables
directly, or find them online in many places.

Tony H.

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

Reply via email to