there appears to be a problem with encoding high surrogates (characters in the range 0xD800 to 0xDBFF)

Code:
//echo -a $len($utfencode($chr($base(D800,16,10))))


= 1

Code:
//echo -a $len($utfencode(a $+ $chr($base(D800,16,10)) $+ b))


= 5


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde