Wide-character literals can be represented in various ways. These representations and how they are handled are described below:
wchar_t *wcs = L" ??(";
is equivalent to:
wchar_t wcs[] = {0x0020, 0x005B, 0x0000};
For more information about trigraphs, see WebSphere Development Studio: ILE C/C++ Language Reference.
wchar_t *wcs = L" \t \n";
is equivalent to:
wchar_t wcs[] = {0x0020, 0x0009, 0x0020, 0x000A, 0x0000};
wchar_t *wcs = L" \x4145";
is equivalent to:
wchar_t wcs[] = {0x0020, 0x4145, 0x0000};
Specifying \xnn in a wchar_t string literal is equivalent to specifying \x00nn.
Hexadecimal constant values larger than 0xFF are normally considered invalid. Setting the *LOCALEUCS2 option changes this to allow 2-byte hexadecimal initialization of wchar_t types only. For example:
wchar_t wc = L'\x4145'; /* Valid only with *LOCALEUCS2 option, */ /* otherwise an out of bounds error */ /* will result. */ char c = '\x4145'; /* Not valid due to size restriction. */ /* Error will result with or without */ /* specifying *LOCALEUCS2 option. */
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.