Handling Surrogate pairs while parsing xml using libxml2
问题 I am trying to parse xml using libxml2. However, sometimes I get code points of surrogate pairs in it which are outside the range specified in http://www.w3.org/TR/REC-xml/#NT-Char Because of this, my libxml2 parser is not able to parse it and thus I get error. Can somebody tell me how to handle surrogate pairs while parsing XML using libxml2. An example xml I want to parse is: <?xml version="1.0" encoding="UTF-8"?> <message><body> ��</body></message> 回答1: Note that xD83D is a