exsom v0.2.1 Exsom.Unicode

All things encoding.

Summary

Functions

Decodes XML in binary form

Tries to detect the encoding. It looks at the first couple of bytes. If these bytes cannot give a definitive answer, it looks into the xml declaration

Functions

convert(xml)

Specs

Decodes XML in binary form.

convert(data, list)

Specs

convert(data :: any, [{:bytes, 8}]) :: any
convert(data :: any, bytes: 16, endian: :little) :: any
convert(data :: any, bytes: 16, endian: :big) :: any
detect_encoding(doc)

Specs

detect_encoding(doc :: Exsom.xml) :: {atom, Exsom.binary_xml}

Tries to detect the encoding. It looks at the first couple of bytes. If these bytes cannot give a definitive answer, it looks into the xml declaration.

Possible values:

  • ucs4be
  • ucs4le
  • utf16be
  • utf16le
  • utf8
  • iso_8859_1