Skip to main content

Products   >   IBM Systems   >   System z   >   z/OS   >  

APAR PQ33356

 

Codeset Conversion Using UCS-2

Additional values have been added to the _ICONV_UCS2 environment variable in support of direct unicode converters.

(The following information is being added to the OS/390 C/C++ Programming Guide, in Chapter 54. Code Set Conversion Utilities,in the section, Codeset Conversion Using UCS-2.)

OS/390 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:

  1. 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.

  2. The application must specify compatible source and target code set names on various iconv_open() requests. For example, this can be accomplished by using a code set registry such as is used by DCE to prevent iconv setup for conversion from incompatible code sets.

See C/C++ Programming Guide for additional information.
[ Return to Services ]