Previous Page | Next Page

Formats for NLS

$UCS2Xw. Format



Processes a character string that is in the encoding of the current SAS session, and then writes the character string in native-endian, 16-bit, UCS2, Unicode encoding.
Category: Character
Alignment: left

Syntax
Syntax Description
Details
Comparison
Example
See Also

Syntax

$UCS2Xw.


Syntax Description

w

specifies the width of the output field. Specify enough width to accommodate the 16-bit size of the Unicode characters.

Default: 8
Range: 2-32767

Details

The $UCS2Xw. format writes a character string in 16-bit, UCS2 (universal character set code in two octets), Unicode encoding, by using byte order that is native to the operating environment.


Comparison

The $UCS2Xw. format performs processing that is the opposite of the $UCS2XEw. format. If you are exchanging data within the same operating environment, use the $UCS2Xw. format. If you are exchanging data with a different operating environment, use the $UCS2Bw. format or $UCS2Lw. format.


Example

This example uses the Japanese Shift_JIS session encoding, which is supported under the UNIX operating environment.

Statements Result

----+----1
x = ' [untitled graphic]';

put x $ucs2x2.;
'5927'x (binary) or '2759'x (little endian)


See Also

Formats:

$UCS2Bw. Format

$UCS2XEw. Format

$UCS2Lw. Format

$UTF8Xw. Format

Informats:

$UCS2Bw. Informat

$UCS2Lw. Informat

$UCS2Xw. Informat

$UCS2XEw. Informat

$UTF8Xw. Informat

Previous Page | Next Page | Top of Page