ENTMF 

The ULENGTH Function

The ULENGTH function returns an integer value that is equal to the number of UTF-8 characters in a character string argument that is encoded in UTF-8.

The function type is integer.

General Format

Arguments

argument-1
must be alphabetic or alphanumeric, and must contain valid UTF-8 encoded characters.

Returned Values

The returned value is the number of UTF-8 characters in argument-1.

Notes

If the UTF-8 argument contains composed characters (for example, ä, ê, and ü), the combining characters are counted individually in determining the length. See the following example where the returned value may vary for a composed character:

Character Unicode encoding UTF-8 encoding Returned value
ä

U+00E4

(precomposed form, latin small letter a with diaeresis)

x'C3A4' 1

U+0061 + U+0308

(canonical decomposition, latin small letter a + combining diaeresis)

x'61CC88' 2