UPOS returns a FIXED BIN(31) value which is the index of the nth UTF character in a string.
>>-UPOS(x,n)---------------------------------------------------><
If x has CHARACTER type, then the string must contain valid UTF-8 data. If not, the program is in error.
If x has WIDECHAR type, then the string must contain valid UTF-16 data. If not, the program is in error.
If n is not positive or if n is larger than ULENGTH(x), then zero will be returned. Otherwise, if x has CHARACTER type, then UPOS(x,n) will return the position of the byte where the nth UTF-8 character starts, and if x has WIDECHAR type, then UPOS(x,n) will return the position of the widechar character where the nth UTF-16 character starts.