Discussion:
COBOL compiler CODEPAGE() when inter-operating with C & UNIX.
Add Reply
John McKown
2017-05-10 12:23:22 UTC
Reply
Permalink
Raw Message
<Whew>
Another discussion "turned me on to" the use of NATIONAL characters in
COBOL. Basically, from my reading, this is UTF-16BE with a CCSID of 1200.
That got me to looking at CCSIDs in COBOL in general. Which lead me to the
CODEPAGE() compile parameter.

Finally, to the question: If I am planning to inter-operate with C and/or
UNIX, should I use CODEPAGE(1047) instead of the default of 1140 (which is
CP-37 with Euro). I am thinking this would likely be necessary if I use
some of the C language subroutines which deal with regular expressions.
This is due to the "wrong" encoding of "[" "]" and others in CP-37.
--
Advertising is a valuable economic factor because it is the cheapest way of
selling goods, particularly if the goods are worthless. -- Sinclair Lewis


Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Tony Harminc
2017-05-11 04:30:38 UTC
Reply
Permalink
Raw Message
Post by John McKown
Finally, to the question: If I am planning to inter-operate with C and/or
UNIX, should I use CODEPAGE(1047) instead of the default of 1140 (which is
CP-37 with Euro). I am thinking this would likely be necessary if I use
some of the C language subroutines which deal with regular expressions.
This is due to the "wrong" encoding of "[" "]" and others in CP-37.
CP 1140 is essentially 037+Euro. I think you want CP 924, which is 1047+Euro.
(Both the "with Euro" CPs also have, so as to encode the same set of
characters as ISO 8859-15, a small number of additional characters for
French and some other Western European languages.)

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...