Previous Page | Next Page

Functions for NLS

UNICODEWIDTH Function



specifies the length of a display unit for the Unicode data.
Category: Character

Syntax
Details
Examples
See Also

Syntax

UNICODEWIDTH()


Details

The UNICODEWIDTH function specifies the length of a display unit for the Unicode data. The display unit displays the width of a character when the character is displayed with fixed width font. Characters between 0x3000 and 0x303F, 0x3400 and 0x4DFF, 0x4E00 and 0x9FFF, 0xF900 and 0xFAFF, inclusively, have the value of a display unit 2. Other characters are display unit 1


Examples

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

Statements Results
len1=unicodewidth("abc [untitled graphic]");
len1=5
len2=unicodewidth("\u0041\u0042\u0043\u5927",'esc'); len2=5
len3=unicodewidth("大 ",'ncr'); len3=2
len4=unicodewidth("<u0061><u0062>",'paren'); len4=2


See Also

Functions:

UNICODELEN Function

Previous Page | Next Page | Top of Page