Fix incorrect XML char determination

A "char" in Java is a signed 16 bits unsigned integer. It cannot be used
to represent Unicode supplementary characters and uses surrogate code
points in the basic plane instead.