On Mon, Nov 3, 2014 at 9:51 AM, Farley, Peter x23353 <
[email protected]> wrote:

> 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
>
>
​An interesting idea, but not applicable to my current project. This is
"porting" SQLite to z/OS in such a way that the file on disk is actually
transportable between z/OS and Linux/Windows/AIX. The big vs. little endian
problem is already solved in the existing code. I used IEEE floats in the
compile, so they are compatible. But the strings used for metadata are in
EBCDIC on z/OS and ASCII (ISO8859-1) on the other platforms, thus not
transportable. The doc actually states that the character metadata is in
UTF-8, but that is not enforced in the code. It is actually in the native
code points of the OS (or application?) running SQLite.​

​I'm going with the #pragma convert() that I've been pointed to. And which
I somehow just didn't understand. Brain fart, I guess.​

-- 
The temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! <><
John McKown

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

Reply via email to