The simplest way I can imagine is a data-only assembler subroutine statically 
linked to your C/C++ code with each initialized variable declared as an EXTRN 
name (or whatever GOFF magic may be needed to match C/C++ mangled names).

Define the strings in assembler using one of these formats:

ascname DC CA'characters you want in ISO8859 here'  Note: I am ASSUMing that 
type CA means ISO8859!

utfname DC CU'characters you want in UTF16 here'

That only addresses ISO8859 and UTF16 though, and obviously depends on whatever 
the HLASM definition of ISO8859 and UTF16 may be.  And actually the HLASM FM 
says that the CA type is "ASCII", so that could be ISO8859 or not, depending on 
the implementation.

You may have to research the C/C++ runtime library guide for functions to 
perform on-the-fly code conversion (i.e., whatever iconv uses internally) if 
you want/need other code pages.

FWIW, I don't believe that any C/C++ implementation on any hardware platform 
provides an "easy" way to do what you want.

HTH

Peter

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of John McKown
Sent: Monday, November 03, 2014 10:10 AM
To: [email protected]
Subject: C Language: non-EBCDIC characters in literal strings.

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 temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! <><
John McKown
--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to