CHAR_LENGTH Function

The CHAR_LENGTH function returns the number of logical characters in its argument, which can be a character column, a character variable, or a quoted string. This built-in function can also be invoked as CHARACTER_LENGTH.

In the default U.S. English locale and other single-byte locales, CHAR_LENGTH behaves exactly like the LENGTH function, and returns the number of bytes in its argument.

For multibyte code sets, however, which various Unicode, East Asian, and other nondefault locales support, the return value can be less than the number of bytes in the argument. For a discussion of this function, see the HCL OneDB™ GLS User's Guide.