z/OS® XL C/C++ iconv
supports use of UCS-2 as an intermediate code set for conversion of
characters encoded in one code set to another. The
_ICONV_UCS2 environment
variable instructs
iconv_open("Y", "X") whether or
not to set up indirect conversion from code set X to code set Y using
UCS-2 as an intermediate code set. Values
iconv_open() recognizes
for
_ICONV_UCS2 are:
- 1
- Set up indirect conversion using UCS-2 first. The indirect conversions
will use direct unicode converters if available, if not, iconv_open() will
fopen/fread uconvTable binaries. If set up of indirect conversion
fails, iconv_open() will try to set up direct conversion.
- 2
- Set up direct conversion first. If this fails, try to set up
indirect conversion using UCS-2. The indirect conversions will use
direct unicode converters if available, if not, iconv_open() will
fopen/fread uconvTable binaries.This is the default.
- 3
- Set up direct conversion first. If this fails, try to set up
indirect conversion using UCS-2. The indirect conversions will use
direct unicode converters, if direct unicode converters are unavailable,
the iconv_open() request fails.
- N
- Never set up indirect conversion using UCS-2. If a direct converter
cannot be found, the iconv_open() request fails.
- D
- Never set up indirect conversion using UCS-2. If a direct converter
cannot be found, the iconv_open() request fails.
- O
- Only set up indirect conversion using UCS-2. iconv_open() will
fopen/fread uconvTable binaries. Direct unicode converters will not be
used. If required unconvTable binaries cannot be found, the iconv_open() request
fails..
- U
- Only set up indirect conversion using UCS-2. The indirect conversions
will use direct unicode converters if available, if not, iconv_open() will
fopen/fread uconvTable binaries.
Notes: - _ICONV_UCS2 environment variable only has effect
when ICONV_MODE is set to C.
- If the value of the _ICONV_UCS2 environment variable
allows iconv_open("Y", "X") to use UCS-2 as an intermediate
code set when it cannot find a direct converter from X to Y, iconv_open() will
attempt to do so even if X and Y are not compatible code sets. That
is, even if character sets encoded by X and Y are not the same, iconv_open() will
set up conversion from X to UCS-2 to Y.
- The application must specify compatible source and target code
set names on various iconv_open() requests. For detailed
information about code set characteristics, refer to the specific
coded character set identifier in the CCSID repository. For more information,
refer to the following URL:
http://www-01.ibm.com/software/globalization/ccsid/ccsid_registered.html