MCPcopy Create free account
hub / github.com/AnalyseSI/AnalyseSI / detectEncoding

Method detectEncoding

src/com/microstar/xml/XmlParser.java:3406–3472  ·  view source on GitHub ↗

Attempt to detect the encoding of an entity. The trick here (as suggested in the XML standard) is that any entity not in UTF-8, or in UCS-2 with a byte-order mark, must begin with an XML declaration or an encoding declaration; we simply have to look for "&lt;?XML" in various encodings. <

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

pushURLMethod · 0.95

Calls 3

tryEncodingMethod · 0.95
errorMethod · 0.95

Tested by

no test coverage detected