John McKown wrote:
OK, unless I'm really missing something, this is a "no way" proposition.
What I could really use is a _simple_ way to create non-EBCDIC literal
strings. So that I could easily do somethng like:
const char[]=ISO8859-1("This is an ISO8850-1 encoded string");
Yes, I could just render that in "escape sequences". But that is _ugly_ and
not as easily (intuitively) understood. Or I could use iconv() to convert
it at run time.
And ideas no how to accomplish my goal - easily?
The mainframe C compilers have extensions that let you
specify either an ASCII or EBCDIC rendition of a constant.
These are usually prefix extensions... for the Dignus compiler,
if you wanted to have a particular character or string constant
be in the ASCII character set, while the default is in the EBCDIC
(and which EBCDIC is also set-able) character set, then you would
use the 'A' prefix
For example:
const char ASCII_str[] = A"This is an ASCII encoded string";
const char EBCDIC_str[] = E"This is an EBCDIC encoded string";
const char default_str[] = "This is a default-encoded string, could
be EBCDIC or ASCII";
The IBM compiler has similar extensions.
- Dave Rivers -
--
[email protected] Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN