Add an optional 5th parameter to the next_char() function that is the
collating sequence to use for comparison.