Decodes a character starting at ref_p.
Set to one past the ASCII char or one past the last trail byte of the valid UTF-8 sequence.
See Implementation
Decodes a character starting at ref_p.