pickup icon indicating copy to clipboard operation
pickup copied to clipboard

Autodetection of Character Encodings

Open michaelnisi opened this issue 8 years ago • 0 comments

In the common use case, streaming a feed over HTTP, we receive the encoding via the Content-Type HTTP header and pass it to our constructor.

But what if we we don't know the encoding upfront? In this case the parser has to use the BOM, so it can reliably read the encoding tag. If no BOM is available use ASCII to read the tag. If this fails, assume UTF-8.

https://www.w3.org/TR/REC-xml/#sec-guessing

michaelnisi avatar Nov 10 '16 08:11 michaelnisi