Fix for issue# 8890: commonPrefix does not handle unicode correctly.

It was returning partial code points if the first few code units in a code point matched but not the entire code point.