ILE C/C++ Compiler Reference


convert

>>-#--pragma--convert--(--ccsid--)-----------------------------><
 
 

Description

Specifies the Coded Character Set Identifier (CCSID) to use for converting the string literals from that point onward in a source file during compilation. The conversion continues until the end of the source file or until another #pragma convert directive is specified. Use #pragma convert (0) to disable the previous #pragma convert directive. The CCSID of the string literals before conversion is the same CCSID as the root source member. CCSIDs 905 and 1026 are not supported. The CCSID can be either EBCDIC or ASCII.

Parameters

ccsid
Specifies the coded character set identifier to use for converting the strings and literals in the source file. The value may range between 0 and 65535. See the ILE C/C++ Run-Time Library Functions manual for more information about code pages.

Notes on Usage

The run-time library functions that parse format strings (such as printf() and scanf()) cannot use ASCII format strings. Therefore, all format strings must be in EBCDIC.

String and character constants that are specified in hex, for example (0xC1), are not converted.

Substitution characters will not be used when converting to a target CCSID that does not contain the same symbol set as the source CCSID. The compilation will fail.

If a CCSID with the value 65535 is specified, the CCSID of the root source member is assumed. If the source file CCSID value is 65535, the job CCSID is assumed for the source file. If the file CCSID is 65535 and the job CCSID is not 65535, the job CCSID is assumed for the file CCSID. If the file is 65535 and the job is also 65535, but the system CCSID value is not 65535, the system CCSID value is assumed for the file CCSID. If the file, job and system CCSID values are 65535, CCSID 037 is assumed.

If the LOCALETYPE(*LOCALEUCS2) option is specified for the Create Module or Create Bound Program commands, wide-character literals are not converted. See Using Unicode Support for Wide-Character Literals in WebSphere Development Studio: ILE C/C++ Programmer's Guide for more information.


[ Top of Page | Previous Page | Next Page | Table of Contents ]