Encoding for an XML document containing U+001A

后端 未结 3 597
醉酒成梦
醉酒成梦 2021-01-16 03:53

I have an XML document that\'s being generated from some content that people are copy/pasting from all sorts of places (Word documents mostly though).

It looks like

3条回答
  •  清酒与你
    2021-01-16 04:30

    Preprocess the original data, encoding Unicode characters not supported by XML documents yourself. for example, use HTML character encodings:

    
    
                 
    
    

    You'll have to post-process the data when read back in to convert the HTML encoding back to the correct Unicode character.

提交回复
热议问题