ULENGTH8 returns a FIXED BIN(31) value which is the length of a CHAR string needed if the UTF characters held in a string were converted to UTF-8.
>>-ULENGTH8(x)-------------------------------------------------><
If x has CHARACTER type, then ULENGTH8 is the same as LENGTH, and the string will not be checked for valid UTF-8 data.
If x has WIDECHAR type, then the string must contain valid UTF-16 data, and ULENGTH8 will return the length of the CHAR string that would result if x were converted from UTF-16 to UTF-8. If the string does not contain valid UTF-16 data, the program is in error.