Fix signed char issues in xml_escape_entities